Class FewShotExample.Builder (4.61.0)

public static final class FewShotExample.Builder extends GeneratedMessageV3.Builder<FewShotExample.Builder> implements FewShotExampleOrBuilder

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

Protobuf type google.cloud.dialogflow.v2beta1.FewShotExample

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public FewShotExample.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FewShotExample.Builder
Overrides

build()

public FewShotExample build()
Returns
Type Description
FewShotExample

buildPartial()

public FewShotExample buildPartial()
Returns
Type Description
FewShotExample

clear()

public FewShotExample.Builder clear()
Returns
Type Description
FewShotExample.Builder
Overrides

clearConversationContext()

public FewShotExample.Builder clearConversationContext()

Optional. Conversation transcripts.

.google.cloud.dialogflow.v2beta1.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FewShotExample.Builder

clearExtraInfo()

public FewShotExample.Builder clearExtraInfo()
Returns
Type Description
FewShotExample.Builder

clearField(Descriptors.FieldDescriptor field)

public FewShotExample.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
FewShotExample.Builder
Overrides

clearInstructionList()

public FewShotExample.Builder clearInstructionList()
Returns
Type Description
FewShotExample.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public FewShotExample.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
FewShotExample.Builder
Overrides

clearOutput()

public FewShotExample.Builder clearOutput()

Required. Example output of the model.

.google.cloud.dialogflow.v2beta1.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
FewShotExample.Builder

clearSummarizationSectionList()

public FewShotExample.Builder clearSummarizationSectionList()

Summarization sections.

.google.cloud.dialogflow.v2beta1.SummarizationSectionList summarization_section_list = 6;

Returns
Type Description
FewShotExample.Builder

clone()

public FewShotExample.Builder clone()
Returns
Type Description
FewShotExample.Builder
Overrides

containsExtraInfo(String key)

public boolean containsExtraInfo(String key)

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

map<string, string> extra_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getConversationContext()

public ConversationContext getConversationContext()

Optional. Conversation transcripts.

.google.cloud.dialogflow.v2beta1.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConversationContext

The conversationContext.

getConversationContextBuilder()

public ConversationContext.Builder getConversationContextBuilder()

Optional. Conversation transcripts.

.google.cloud.dialogflow.v2beta1.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConversationContext.Builder

getConversationContextOrBuilder()

public ConversationContextOrBuilder getConversationContextOrBuilder()

Optional. Conversation transcripts.

.google.cloud.dialogflow.v2beta1.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConversationContextOrBuilder

getDefaultInstanceForType()

public FewShotExample getDefaultInstanceForType()
Returns
Type Description
FewShotExample

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getExtraInfo() (deprecated)

public Map<String,String> getExtraInfo()

Use #getExtraInfoMap() instead.

Returns
Type Description
Map<String,String>

getExtraInfoCount()

public int getExtraInfoCount()

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

map<string, string> extra_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getExtraInfoMap()

public Map<String,String> getExtraInfoMap()

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

map<string, string> extra_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getExtraInfoOrDefault(String key, String defaultValue)

public String getExtraInfoOrDefault(String key, String defaultValue)

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

map<string, string> extra_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getExtraInfoOrThrow(String key)

public String getExtraInfoOrThrow(String key)

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

map<string, string> extra_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getInstructionListCase()

public FewShotExample.InstructionListCase getInstructionListCase()
Returns
Type Description
FewShotExample.InstructionListCase

getMutableExtraInfo() (deprecated)

public Map<String,String> getMutableExtraInfo()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getOutput()

public GeneratorSuggestion getOutput()

Required. Example output of the model.

.google.cloud.dialogflow.v2beta1.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GeneratorSuggestion

The output.

getOutputBuilder()

public GeneratorSuggestion.Builder getOutputBuilder()

Required. Example output of the model.

.google.cloud.dialogflow.v2beta1.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GeneratorSuggestion.Builder

getOutputOrBuilder()

public GeneratorSuggestionOrBuilder getOutputOrBuilder()

Required. Example output of the model.

.google.cloud.dialogflow.v2beta1.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GeneratorSuggestionOrBuilder

getSummarizationSectionList()

public SummarizationSectionList getSummarizationSectionList()

Summarization sections.

.google.cloud.dialogflow.v2beta1.SummarizationSectionList summarization_section_list = 6;

Returns
Type Description
SummarizationSectionList

The summarizationSectionList.

getSummarizationSectionListBuilder()

public SummarizationSectionList.Builder getSummarizationSectionListBuilder()

Summarization sections.

.google.cloud.dialogflow.v2beta1.SummarizationSectionList summarization_section_list = 6;

Returns
Type Description
SummarizationSectionList.Builder

getSummarizationSectionListOrBuilder()

public SummarizationSectionListOrBuilder getSummarizationSectionListOrBuilder()

Summarization sections.

.google.cloud.dialogflow.v2beta1.SummarizationSectionList summarization_section_list = 6;

Returns
Type Description
SummarizationSectionListOrBuilder

hasConversationContext()

public boolean hasConversationContext()

Optional. Conversation transcripts.

.google.cloud.dialogflow.v2beta1.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the conversationContext field is set.

hasOutput()

public boolean hasOutput()

Required. Example output of the model.

.google.cloud.dialogflow.v2beta1.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the output field is set.

hasSummarizationSectionList()

public boolean hasSummarizationSectionList()

Summarization sections.

.google.cloud.dialogflow.v2beta1.SummarizationSectionList summarization_section_list = 6;

Returns
Type Description
boolean

Whether the summarizationSectionList field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeConversationContext(ConversationContext value)

public FewShotExample.Builder mergeConversationContext(ConversationContext value)

Optional. Conversation transcripts.

.google.cloud.dialogflow.v2beta1.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ConversationContext
Returns
Type Description
FewShotExample.Builder

mergeFrom(FewShotExample other)

public FewShotExample.Builder mergeFrom(FewShotExample other)
Parameter
Name Description
other FewShotExample
Returns
Type Description
FewShotExample.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public FewShotExample.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FewShotExample.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public FewShotExample.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
FewShotExample.Builder
Overrides

mergeOutput(GeneratorSuggestion value)

public FewShotExample.Builder mergeOutput(GeneratorSuggestion value)

Required. Example output of the model.

.google.cloud.dialogflow.v2beta1.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value GeneratorSuggestion
Returns
Type Description
FewShotExample.Builder

mergeSummarizationSectionList(SummarizationSectionList value)

public FewShotExample.Builder mergeSummarizationSectionList(SummarizationSectionList value)

Summarization sections.

.google.cloud.dialogflow.v2beta1.SummarizationSectionList summarization_section_list = 6;

Parameter
Name Description
value SummarizationSectionList
Returns
Type Description
FewShotExample.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FewShotExample.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FewShotExample.Builder
Overrides

putAllExtraInfo(Map<String,String> values)

public FewShotExample.Builder putAllExtraInfo(Map<String,String> values)

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

map<string, string> extra_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
FewShotExample.Builder

putExtraInfo(String key, String value)

public FewShotExample.Builder putExtraInfo(String key, String value)

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

map<string, string> extra_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
FewShotExample.Builder

removeExtraInfo(String key)

public FewShotExample.Builder removeExtraInfo(String key)

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

map<string, string> extra_info = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
FewShotExample.Builder

setConversationContext(ConversationContext value)

public FewShotExample.Builder setConversationContext(ConversationContext value)

Optional. Conversation transcripts.

.google.cloud.dialogflow.v2beta1.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ConversationContext
Returns
Type Description
FewShotExample.Builder

setConversationContext(ConversationContext.Builder builderForValue)

public FewShotExample.Builder setConversationContext(ConversationContext.Builder builderForValue)

Optional. Conversation transcripts.

.google.cloud.dialogflow.v2beta1.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue ConversationContext.Builder
Returns
Type Description
FewShotExample.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public FewShotExample.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FewShotExample.Builder
Overrides

setOutput(GeneratorSuggestion value)

public FewShotExample.Builder setOutput(GeneratorSuggestion value)

Required. Example output of the model.

.google.cloud.dialogflow.v2beta1.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value GeneratorSuggestion
Returns
Type Description
FewShotExample.Builder

setOutput(GeneratorSuggestion.Builder builderForValue)

public FewShotExample.Builder setOutput(GeneratorSuggestion.Builder builderForValue)

Required. Example output of the model.

.google.cloud.dialogflow.v2beta1.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue GeneratorSuggestion.Builder
Returns
Type Description
FewShotExample.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public FewShotExample.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
FewShotExample.Builder
Overrides

setSummarizationSectionList(SummarizationSectionList value)

public FewShotExample.Builder setSummarizationSectionList(SummarizationSectionList value)

Summarization sections.

.google.cloud.dialogflow.v2beta1.SummarizationSectionList summarization_section_list = 6;

Parameter
Name Description
value SummarizationSectionList
Returns
Type Description
FewShotExample.Builder

setSummarizationSectionList(SummarizationSectionList.Builder builderForValue)

public FewShotExample.Builder setSummarizationSectionList(SummarizationSectionList.Builder builderForValue)

Summarization sections.

.google.cloud.dialogflow.v2beta1.SummarizationSectionList summarization_section_list = 6;

Parameter
Name Description
builderForValue SummarizationSectionList.Builder
Returns
Type Description
FewShotExample.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final FewShotExample.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FewShotExample.Builder
Overrides