Class: Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Generator
- Inherits:
-
Object
- Object
- Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Generator
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/dialogflow_v3/classes.rb,
lib/google/apis/dialogflow_v3/representations.rb,
lib/google/apis/dialogflow_v3/representations.rb
Overview
Generators contain prompt to be sent to the LLM model to generate text. The prompt can contain parameters which will be resolved before calling the model. It can optionally contain banned phrases to ensure the model responses are safe.
Instance Attribute Summary collapse
-
#display_name ⇒ String
Required.
-
#name ⇒ String
The unique identifier of the generator.
-
#placeholders ⇒ Array<Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3GeneratorPlaceholder>
Optional.
-
#prompt_text ⇒ Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Phrase
Text input which can be used for prompt or banned phrases.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDialogflowCxV3Generator
constructor
A new instance of GoogleCloudDialogflowCxV3Generator.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDialogflowCxV3Generator
Returns a new instance of GoogleCloudDialogflowCxV3Generator.
3835 3836 3837 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3835 def initialize(**args) update!(**args) end |
Instance Attribute Details
#display_name ⇒ String
Required. The human-readable name of the generator, unique within the agent.
The prompt contains pre-defined parameters such as $conversation, $last-user-
utterance, etc. populated by Dialogflow. It can also contain custom
placeholders which will be resolved during fulfillment.
Corresponds to the JSON property displayName
3816 3817 3818 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3816 def display_name @display_name end |
#name ⇒ String
The unique identifier of the generator. Must be set for the Generators.
UpdateGenerator method. Generators.CreateGenerate populates the name
automatically. Format: projects//locations//agents//generators/.
Corresponds to the JSON property name
3823 3824 3825 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3823 def name @name end |
#placeholders ⇒ Array<Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3GeneratorPlaceholder>
Optional. List of custom placeholders in the prompt text.
Corresponds to the JSON property placeholders
3828 3829 3830 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3828 def placeholders @placeholders end |
#prompt_text ⇒ Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Phrase
Text input which can be used for prompt or banned phrases.
Corresponds to the JSON property promptText
3833 3834 3835 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3833 def prompt_text @prompt_text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3840 3841 3842 3843 3844 3845 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3840 def update!(**args) @display_name = args[:display_name] if args.key?(:display_name) @name = args[:name] if args.key?(:name) @placeholders = args[:placeholders] if args.key?(:placeholders) @prompt_text = args[:prompt_text] if args.key?(:prompt_text) end |