Class: Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1Generator
- Inherits:
-
Object
- Object
- Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1Generator
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/dialogflow_v3beta1/classes.rb,
lib/google/apis/dialogflow_v3beta1/representations.rb,
lib/google/apis/dialogflow_v3beta1/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.
-
#llm_model_settings ⇒ Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1LlmModelSettings
Settings for LLM models.
-
#name ⇒ String
The unique identifier of the generator.
-
#placeholders ⇒ Array<Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1GeneratorPlaceholder>
Optional.
-
#prompt_text ⇒ Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1Phrase
Text input which can be used for prompt or banned phrases.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDialogflowCxV3beta1Generator
constructor
A new instance of GoogleCloudDialogflowCxV3beta1Generator.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDialogflowCxV3beta1Generator
Returns a new instance of GoogleCloudDialogflowCxV3beta1Generator.
8279 8280 8281 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8279 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
8255 8256 8257 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8255 def display_name @display_name end |
#llm_model_settings ⇒ Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1LlmModelSettings
Settings for LLM models.
Corresponds to the JSON property llmModelSettings
8260 8261 8262 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8260 def llm_model_settings @llm_model_settings 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
8267 8268 8269 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8267 def name @name end |
#placeholders ⇒ Array<Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1GeneratorPlaceholder>
Optional. List of custom placeholders in the prompt text.
Corresponds to the JSON property placeholders
8272 8273 8274 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8272 def placeholders @placeholders end |
#prompt_text ⇒ Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1Phrase
Text input which can be used for prompt or banned phrases.
Corresponds to the JSON property promptText
8277 8278 8279 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8277 def prompt_text @prompt_text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
8284 8285 8286 8287 8288 8289 8290 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8284 def update!(**args) @display_name = args[:display_name] if args.key?(:display_name) @llm_model_settings = args[:llm_model_settings] if args.key?(:llm_model_settings) @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 |