Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2FewShotExample

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2/classes.rb,
lib/google/apis/dialogflow_v2/representations.rb,
lib/google/apis/dialogflow_v2/representations.rb

Overview

Providing examples in the generator (i.e. building a few-shot generator) helps convey the desired format of the LLM response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2FewShotExample

Returns a new instance of GoogleCloudDialogflowV2FewShotExample.



10353
10354
10355
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10353

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

Instance Attribute Details

#conversation_contextGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2ConversationContext

Context of the conversation, including transcripts. Corresponds to the JSON property conversationContext



10334
10335
10336
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10334

def conversation_context
  @conversation_context
end

#extra_infoHash<String,String>

Optional. Key is the placeholder field name in input, value is the value of the placeholder. E.g. instruction contains "@price", and ingested data has <" price", "10"> Corresponds to the JSON property extraInfo

Returns:

  • (Hash<String,String>)


10341
10342
10343
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10341

def extra_info
  @extra_info
end

#outputGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2GeneratorSuggestion

Suggestion generated using a Generator. Corresponds to the JSON property output



10346
10347
10348
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10346

def output
  @output
end

#summarization_section_listGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2SummarizationSectionList

List of summarization sections. Corresponds to the JSON property summarizationSectionList



10351
10352
10353
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10351

def summarization_section_list
  @summarization_section_list
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10358
10359
10360
10361
10362
10363
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10358

def update!(**args)
  @conversation_context = args[:conversation_context] if args.key?(:conversation_context)
  @extra_info = args[:extra_info] if args.key?(:extra_info)
  @output = args[:output] if args.key?(:output)
  @summarization_section_list = args[:summarization_section_list] if args.key?(:summarization_section_list)
end