Class: Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1Generator

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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowCxV3beta1Generator

Returns a new instance of GoogleCloudDialogflowCxV3beta1Generator.



6814
6815
6816
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 6814

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)


6795
6796
6797
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 6795

def display_name
  @display_name
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)


6802
6803
6804
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 6802

def name
  @name
end

#placeholdersArray<Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1GeneratorPlaceholder>

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



6807
6808
6809
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 6807

def placeholders
  @placeholders
end

#prompt_textGoogle::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1Phrase

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



6812
6813
6814
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 6812

def prompt_text
  @prompt_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6819
6820
6821
6822
6823
6824
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 6819

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