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.
-
#llm_model_settings ⇒ Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3LlmModelSettings
Settings for LLM models.
-
#model_parameter ⇒ Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3GeneratorModelParameter
Parameters to be passed to the LLM.
-
#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.
4274 4275 4276 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4274 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
4245 4246 4247 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4245 def display_name @display_name end |
#llm_model_settings ⇒ Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3LlmModelSettings
Settings for LLM models.
Corresponds to the JSON property llmModelSettings
4250 4251 4252 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4250 def llm_model_settings @llm_model_settings end |
#model_parameter ⇒ Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3GeneratorModelParameter
Parameters to be passed to the LLM. If not set, default values will be used.
Corresponds to the JSON property modelParameter
4255 4256 4257 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4255 def model_parameter @model_parameter 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
4262 4263 4264 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4262 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
4267 4268 4269 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4267 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
4272 4273 4274 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4272 def prompt_text @prompt_text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4279 4280 4281 4282 4283 4284 4285 4286 |
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 4279 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) @model_parameter = args[:model_parameter] if args.key?(:model_parameter) @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 |