AgentArgs

data class AgentArgs(val apiVersion: Output<String>? = null, val avatarUri: Output<String>? = null, val classificationThreshold: Output<Double>? = null, val defaultLanguageCode: Output<String>? = null, val description: Output<String>? = null, val displayName: Output<String>? = null, val enableLogging: Output<Boolean>? = null, val matchMode: Output<String>? = null, val project: Output<String>? = null, val supportedLanguageCodes: Output<List<String>>? = null, val tier: Output<String>? = null, val timeZone: Output<String>? = null) : ConvertibleToJava<AgentArgs>

A Dialogflow agent is a virtual agent that handles conversations with your end-users. It is a natural language understanding module that understands the nuances of human language. Dialogflow translates end-user text or audio during a conversation to structured data that your apps and services can understand. You design and build a Dialogflow agent to handle the types of conversations required for your system. To get more information about Agent, see:

Example Usage

Dialogflow Agent Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const fullAgent = new gcp.diagflow.Agent("full_agent", {
displayName: "dialogflow-agent",
defaultLanguageCode: "en",
supportedLanguageCodes: [
"fr",
"de",
"es",
],
timeZone: "America/New_York",
description: "Example description.",
avatarUri: "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
enableLogging: true,
matchMode: "MATCH_MODE_ML_ONLY",
classificationThreshold: 0.3,
apiVersion: "API_VERSION_V2_BETA_1",
tier: "TIER_STANDARD",
});
import pulumi
import pulumi_gcp as gcp
full_agent = gcp.diagflow.Agent("full_agent",
display_name="dialogflow-agent",
default_language_code="en",
supported_language_codes=[
"fr",
"de",
"es",
],
time_zone="America/New_York",
description="Example description.",
avatar_uri="https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
enable_logging=True,
match_mode="MATCH_MODE_ML_ONLY",
classification_threshold=0.3,
api_version="API_VERSION_V2_BETA_1",
tier="TIER_STANDARD")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var fullAgent = new Gcp.Diagflow.Agent("full_agent", new()
{
DisplayName = "dialogflow-agent",
DefaultLanguageCode = "en",
SupportedLanguageCodes = new[]
{
"fr",
"de",
"es",
},
TimeZone = "America/New_York",
Description = "Example description.",
AvatarUri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
EnableLogging = true,
MatchMode = "MATCH_MODE_ML_ONLY",
ClassificationThreshold = 0.3,
ApiVersion = "API_VERSION_V2_BETA_1",
Tier = "TIER_STANDARD",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/diagflow"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := diagflow.NewAgent(ctx, "full_agent", &diagflow.AgentArgs{
DisplayName: pulumi.String("dialogflow-agent"),
DefaultLanguageCode: pulumi.String("en"),
SupportedLanguageCodes: pulumi.StringArray{
pulumi.String("fr"),
pulumi.String("de"),
pulumi.String("es"),
},
TimeZone: pulumi.String("America/New_York"),
Description: pulumi.String("Example description."),
AvatarUri: pulumi.String("https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png"),
EnableLogging: pulumi.Bool(true),
MatchMode: pulumi.String("MATCH_MODE_ML_ONLY"),
ClassificationThreshold: pulumi.Float64(0.3),
ApiVersion: pulumi.String("API_VERSION_V2_BETA_1"),
Tier: pulumi.String("TIER_STANDARD"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.diagflow.Agent;
import com.pulumi.gcp.diagflow.AgentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var fullAgent = new Agent("fullAgent", AgentArgs.builder()
.displayName("dialogflow-agent")
.defaultLanguageCode("en")
.supportedLanguageCodes(
"fr",
"de",
"es")
.timeZone("America/New_York")
.description("Example description.")
.avatarUri("https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png")
.enableLogging(true)
.matchMode("MATCH_MODE_ML_ONLY")
.classificationThreshold(0.3)
.apiVersion("API_VERSION_V2_BETA_1")
.tier("TIER_STANDARD")
.build());
}
}
resources:
fullAgent:
type: gcp:diagflow:Agent
name: full_agent
properties:
displayName: dialogflow-agent
defaultLanguageCode: en
supportedLanguageCodes:
- fr
- de
- es
timeZone: America/New_York
description: Example description.
avatarUri: https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png
enableLogging: true
matchMode: MATCH_MODE_ML_ONLY
classificationThreshold: 0.3
apiVersion: API_VERSION_V2_BETA_1
tier: TIER_STANDARD

Import

Agent can be imported using any of these accepted formats:

  • {{project}} When using the pulumi import command, Agent can be imported using one of the formats above. For example:

$ pulumi import gcp:diagflow/agent:Agent default {{project}}

Constructors

Link copied to clipboard
constructor(apiVersion: Output<String>? = null, avatarUri: Output<String>? = null, classificationThreshold: Output<Double>? = null, defaultLanguageCode: Output<String>? = null, description: Output<String>? = null, displayName: Output<String>? = null, enableLogging: Output<Boolean>? = null, matchMode: Output<String>? = null, project: Output<String>? = null, supportedLanguageCodes: Output<List<String>>? = null, tier: Output<String>? = null, timeZone: Output<String>? = null)

Properties

Link copied to clipboard
val apiVersion: Output<String>? = null

API version displayed in Dialogflow console. If not specified, V2 API is assumed. Clients are free to query different service endpoints for different API versions. However, bots connectors and webhook calls will follow the specified API version.

Link copied to clipboard
val avatarUri: Output<String>? = null

The URI of the agent's avatar, which are used throughout the Dialogflow console. When an image URL is entered into this field, the Dialogflow will save the image in the backend. The address of the backend image returned from the API will be shown in the avatarUriBackend field.

Link copied to clipboard
val classificationThreshold: Output<Double>? = null

To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a fallback intent will be triggered or, if there are no fallback intents defined, no intent will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used.

Link copied to clipboard
val defaultLanguageCode: Output<String>? = null

The default language of the agent as a language tag. See Language Support for a list of the currently supported language codes. This field cannot be updated after creation.

Link copied to clipboard
val description: Output<String>? = null

The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected.

Link copied to clipboard
val displayName: Output<String>? = null

The name of this agent.

Link copied to clipboard
val enableLogging: Output<Boolean>? = null

Determines whether this agent should log conversation queries.

Link copied to clipboard
val matchMode: Output<String>? = null

Determines how intents are detected from user queries.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val supportedLanguageCodes: Output<List<String>>? = null

The list of all languages supported by this agent (except for the defaultLanguageCode).

Link copied to clipboard
val tier: Output<String>? = null

The agent tier. If not specified, TIER_STANDARD is assumed.

Link copied to clipboard
val timeZone: Output<String>? = null

The time zone of this agent from the time zone database, e.g., America/New_York, Europe/Paris.

Functions

Link copied to clipboard
open override fun toJava(): AgentArgs