Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3Intent

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2/classes.rb,
lib/google/apis/dialogflow_v2/representations.rb,
lib/google/apis/dialogflow_v2/representations.rb

Overview

An intent represents a user's intent to interact with a conversational agent. You can provide information for the Dialogflow API to use to match user input to an intent by adding training phrases (i.e., examples of user input) to your intent.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowCxV3Intent

Returns a new instance of GoogleCloudDialogflowCxV3Intent.



1705
1706
1707
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 1705

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#descriptionString

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters. Corresponds to the JSON property description

Returns:

  • (String)


1649
1650
1651
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 1649

def description
  @description
end

#display_nameString

Required. The human-readable name of the intent, unique within the agent. Corresponds to the JSON property displayName

Returns:

  • (String)


1654
1655
1656
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 1654

def display_name
  @display_name
end

#is_fallbackBoolean Also known as: is_fallback?

Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event. Corresponds to the JSON property isFallback

Returns:

  • (Boolean)


1663
1664
1665
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 1663

def is_fallback
  @is_fallback
end

#labelsHash<String,String>

The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1676
1677
1678
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 1676

def labels
  @labels
end

#nameString

The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: projects//locations//agents//intents/. Corresponds to the JSON property name

Returns:

  • (String)


1683
1684
1685
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 1683

def name
  @name
end

#parametersArray<Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3IntentParameter>

The collection of parameters associated with the intent. Corresponds to the JSON property parameters



1688
1689
1690
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 1688

def parameters
  @parameters
end

#priorityFixnum

The priority of this intent. Higher numbers represent higher priorities. - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. - If the supplied value is negative, the intent is ignored in runtime detect intent requests. Corresponds to the JSON property priority

Returns:

  • (Fixnum)


1697
1698
1699
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 1697

def priority
  @priority
end

#training_phrasesArray<Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3IntentTrainingPhrase>

The collection of training phrases the agent is trained on to identify the intent. Corresponds to the JSON property trainingPhrases



1703
1704
1705
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 1703

def training_phrases
  @training_phrases
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 1710

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @display_name = args[:display_name] if args.key?(:display_name)
  @is_fallback = args[:is_fallback] if args.key?(:is_fallback)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @parameters = args[:parameters] if args.key?(:parameters)
  @priority = args[:priority] if args.key?(:priority)
  @training_phrases = args[:training_phrases] if args.key?(:training_phrases)
end