Class: Google::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1FewShotExample

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2beta1/classes.rb,
lib/google/apis/dialogflow_v2beta1/representations.rb,
lib/google/apis/dialogflow_v2beta1/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) ⇒ GoogleCloudDialogflowV2beta1FewShotExample

Returns a new instance of GoogleCloudDialogflowV2beta1FewShotExample.



13587
13588
13589
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 13587

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

Instance Attribute Details

#conversation_contextGoogle::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1ConversationContext

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



13568
13569
13570
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 13568

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>)


13575
13576
13577
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 13575

def extra_info
  @extra_info
end

#outputGoogle::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1GeneratorSuggestion

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



13580
13581
13582
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 13580

def output
  @output
end

#summarization_section_listGoogle::Apis::DialogflowV2beta1::GoogleCloudDialogflowV2beta1SummarizationSectionList

List of summarization sections. Corresponds to the JSON property summarizationSectionList



13585
13586
13587
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 13585

def summarization_section_list
  @summarization_section_list
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



13592
13593
13594
13595
13596
13597
# File 'lib/google/apis/dialogflow_v2beta1/classes.rb', line 13592

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