Intent

Intents map open-ended user input to structured objects. Spoken phrases are matched to intents with Google's Natural Language Understanding (NLU). Intent matches can trigger events in your conversation design to progress the user's conversation. The intent name is specified in the name of the file.

YAML representation
parameters: 
  - object (IntentParameter)
trainingPhrases: 
  - string
Fields
parameters[]

object (IntentParameter)

The list of parameters within the training phrases. All parameters must be defined here to be used in the training phrase.

trainingPhrases[]

string

Training phrases allow Google’s NLU to automatically match intents with user input. The more unique phrases that are provided, the better chance this intent will be matched. The following is the format of training phrase part which are annotated. Note that auto field is optional and the default behavior when auto is not specified is equivalent to auto=false. ($<paramName> '<sample text>' auto=<true or false>) auto = true means the part was auto annotated by NLU. auto = false means the part was annotated by the user. This is the default when auto is not specified. Example: "Book a flight from ($source 'San Francisco' auto=false) to ($dest 'Vancouver')"

IntentParameter

Definition of a parameter which can be used inside training phrases.

YAML representation
name: string

# Union field parameter_type can be only one of the following:
type: 
  object (ClassReference)
entitySetReferences: 
  object (EntitySetReferences)
# End of list of possible types for union field parameter_type.
Fields
name

string

Required. Unique name of the intent parameter. Can be used in conditions and responses to reference intent parameters extracted by NLU with $intent.params.[name].resolved

Union field parameter_type. The type of the intent parameter. parameter_type can be only one of the following:
type

object (ClassReference)

Optional. Declares the data type of this parameter. This should not be set for built-in intents.

entitySetReferences

object (EntitySetReferences)

Optional. References to the sets of allowed entities for this intent parameter. Only valid for parameters of a built-in intent. These references point to entity sets in the 'custom/entitySets' directory.

EntitySetReferences

Entity set references for an intent parameter.

YAML representation
entitySetReferences: 
  - object (EntitySetReference)
Fields
entitySetReferences[]

object (EntitySetReference)

Required. Entity set references for an intent parameter.

EntitySetReference

A reference to the set of allowed entities for this intent parameter.

YAML representation
entitySet: string
Fields
entitySet

string

Required. Identifies the specific collection of entities to be considered for a given parameter. The corresponding entity set definition should be present in the custom/entitySets/ directory.