Class: Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Generator

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowCxV3Generator

Returns a new instance of GoogleCloudDialogflowCxV3Generator.



3900
3901
3902
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3900

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

Instance Attribute Details

#display_nameString

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

Returns:

  • (String)


3876
3877
3878
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3876

def display_name
  @display_name
end

#model_parameterGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3GeneratorModelParameter

Parameters to be passed to the LLM. If not set, default values will be used. Corresponds to the JSON property modelParameter



3881
3882
3883
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3881

def model_parameter
  @model_parameter
end

#nameString

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

Returns:

  • (String)


3888
3889
3890
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3888

def name
  @name
end

#placeholdersArray<Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3GeneratorPlaceholder>

Optional. List of custom placeholders in the prompt text. Corresponds to the JSON property placeholders



3893
3894
3895
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3893

def placeholders
  @placeholders
end

#prompt_textGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Phrase

Text input which can be used for prompt or banned phrases. Corresponds to the JSON property promptText



3898
3899
3900
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3898

def prompt_text
  @prompt_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3905
3906
3907
3908
3909
3910
3911
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 3905

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @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