Show / Hide Table of Contents

Class Agent

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:

  • API documentation
  • How-to Guides
  • Official Documentation

Example Usage - Dialogflow Agent Full

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
public MyStack()
{
    var fullAgent = new Gcp.Diagflow.Agent("fullAgent", new Gcp.Diagflow.AgentArgs
    {
        ApiVersion = "API_VERSION_V2_BETA_1",
        AvatarUri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
        ClassificationThreshold = 0.3,
        DefaultLanguageCode = "en",
        Description = "Example description.",
        DisplayName = "dialogflow-agent",
        EnableLogging = true,
        MatchMode = "MATCH_MODE_ML_ONLY",
        SupportedLanguageCodes = 
        {
            "fr",
            "de",
            "es",
        },
        Tier = "TIER_STANDARD",
        TimeZone = "America/New_York",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Agent
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Gcp.Diagflow
Assembly: Pulumi.Gcp.dll
Syntax
public class Agent : CustomResource

Constructors

View Source

Agent(String, AgentArgs, CustomResourceOptions)

Create a Agent resource with the given unique name, arguments, and options.

Declaration
public Agent(string name, AgentArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

AgentArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ApiVersion

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.

  • API_VERSION_V1: Legacy V1 API.
  • API_VERSION_V2: V2 API.
  • API_VERSION_V2_BETA_1: V2beta1 API.
Declaration
public Output<string> ApiVersion { get; }
Property Value
Type Description
Output<System.String>
View Source

AvatarUri

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.

Declaration
public Output<string> AvatarUri { get; }
Property Value
Type Description
Output<System.String>
View Source

AvatarUriBackend

The URI of the agent's avatar as returned from the API. Output only. To provide an image URL for the agent avatar, the [avatarUri] field can be used.

Declaration
public Output<string> AvatarUriBackend { get; }
Property Value
Type Description
Output<System.String>
View Source

ClassificationThreshold

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.

Declaration
public Output<double?> ClassificationThreshold { get; }
Property Value
Type Description
Output<System.Nullable<System.Double>>
View Source

DefaultLanguageCode

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.

Declaration
public Output<string> DefaultLanguageCode { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

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

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

DisplayName

The name of this agent.

Declaration
public Output<string> DisplayName { get; }
Property Value
Type Description
Output<System.String>
View Source

EnableLogging

Determines whether this agent should log conversation queries.

Declaration
public Output<bool?> EnableLogging { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

MatchMode

Determines how intents are detected from user queries.

  • MATCH_MODE_HYBRID: Best for agents with a small number of examples in intents and/or wide use of templates syntax and composite entities.
  • MATCH_MODE_ML_ONLY: Can be used for agents with a large number of examples in intents, especially the ones using @sys.any or very large developer entities.
Declaration
public Output<string> MatchMode { get; }
Property Value
Type Description
Output<System.String>
View Source

Project

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

Declaration
public Output<string> Project { get; }
Property Value
Type Description
Output<System.String>
View Source

SupportedLanguageCodes

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

Declaration
public Output<ImmutableArray<string>> SupportedLanguageCodes { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Tier

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

  • TIER_STANDARD: Standard tier.
  • TIER_ENTERPRISE: Enterprise tier (Essentials).
  • TIER_ENTERPRISE_PLUS: Enterprise tier (Plus). NOTE: Due to consistency issues, the provider will not read this field from the API. Drift is possible between the the provider state and Dialogflow if the agent tier is changed outside of the provider.
Declaration
public Output<string> Tier { get; }
Property Value
Type Description
Output<System.String>
View Source

TimeZone

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

Declaration
public Output<string> TimeZone { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, AgentState, CustomResourceOptions)

Get an existing Agent resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Agent Get(string name, Input<string> id, AgentState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

AgentState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Agent
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.