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.
NEXT_ID: 10
Protobuf type google.cloud.dialogflow.v2.FewShotExample
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public FewShotExample.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public FewShotExample build()
buildPartial()
public FewShotExample buildPartial()
clear()
public FewShotExample.Builder clear()
Overrides
clearConversationContext()
public FewShotExample.Builder clearConversationContext()
Optional. Conversation transcripts.
.google.cloud.dialogflow.v2.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];
public FewShotExample.Builder clearExtraInfo()
clearField(Descriptors.FieldDescriptor field)
public FewShotExample.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearInstructionList()
public FewShotExample.Builder clearInstructionList()
clearOneof(Descriptors.OneofDescriptor oneof)
public FewShotExample.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearOutput()
public FewShotExample.Builder clearOutput()
Required. Example output of the model.
.google.cloud.dialogflow.v2.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];
clearSummarizationSectionList()
public FewShotExample.Builder clearSummarizationSectionList()
Summarization sections.
.google.cloud.dialogflow.v2.SummarizationSectionList summarization_section_list = 6;
clone()
public FewShotExample.Builder clone()
Overrides
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
|
getConversationContext()
public ConversationContext getConversationContext()
Optional. Conversation transcripts.
.google.cloud.dialogflow.v2.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];
getConversationContextBuilder()
public ConversationContext.Builder getConversationContextBuilder()
Optional. Conversation transcripts.
.google.cloud.dialogflow.v2.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];
getConversationContextOrBuilder()
public ConversationContextOrBuilder getConversationContextOrBuilder()
Optional. Conversation transcripts.
.google.cloud.dialogflow.v2.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];
getDefaultInstanceForType()
public FewShotExample getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
public Map<String,String> getExtraInfo()
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 |
|
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];
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];
Returns |
Type |
Description |
String |
|
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()
public Map<String,String> getMutableExtraInfo()
Use alternate mutation accessors instead.
getOutput()
public GeneratorSuggestion getOutput()
Required. Example output of the model.
.google.cloud.dialogflow.v2.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];
getOutputBuilder()
public GeneratorSuggestion.Builder getOutputBuilder()
Required. Example output of the model.
.google.cloud.dialogflow.v2.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];
getOutputOrBuilder()
public GeneratorSuggestionOrBuilder getOutputOrBuilder()
Required. Example output of the model.
.google.cloud.dialogflow.v2.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];
getSummarizationSectionList()
public SummarizationSectionList getSummarizationSectionList()
Summarization sections.
.google.cloud.dialogflow.v2.SummarizationSectionList summarization_section_list = 6;
getSummarizationSectionListBuilder()
public SummarizationSectionList.Builder getSummarizationSectionListBuilder()
Summarization sections.
.google.cloud.dialogflow.v2.SummarizationSectionList summarization_section_list = 6;
getSummarizationSectionListOrBuilder()
public SummarizationSectionListOrBuilder getSummarizationSectionListOrBuilder()
Summarization sections.
.google.cloud.dialogflow.v2.SummarizationSectionList summarization_section_list = 6;
hasConversationContext()
public boolean hasConversationContext()
Optional. Conversation transcripts.
.google.cloud.dialogflow.v2.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.v2.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.v2.SummarizationSectionList summarization_section_list = 6;
Returns |
Type |
Description |
boolean |
Whether the summarizationSectionList field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
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()
Overrides
mergeConversationContext(ConversationContext value)
public FewShotExample.Builder mergeConversationContext(ConversationContext value)
Optional. Conversation transcripts.
.google.cloud.dialogflow.v2.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];
mergeFrom(FewShotExample other)
public FewShotExample.Builder mergeFrom(FewShotExample other)
public FewShotExample.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public FewShotExample.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeOutput(GeneratorSuggestion value)
public FewShotExample.Builder mergeOutput(GeneratorSuggestion value)
Required. Example output of the model.
.google.cloud.dialogflow.v2.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];
mergeSummarizationSectionList(SummarizationSectionList value)
public FewShotExample.Builder mergeSummarizationSectionList(SummarizationSectionList value)
Summarization sections.
.google.cloud.dialogflow.v2.SummarizationSectionList summarization_section_list = 6;
mergeUnknownFields(UnknownFieldSet unknownFields)
public final FewShotExample.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
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];
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];
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
|
setConversationContext(ConversationContext value)
public FewShotExample.Builder setConversationContext(ConversationContext value)
Optional. Conversation transcripts.
.google.cloud.dialogflow.v2.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];
setConversationContext(ConversationContext.Builder builderForValue)
public FewShotExample.Builder setConversationContext(ConversationContext.Builder builderForValue)
Optional. Conversation transcripts.
.google.cloud.dialogflow.v2.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];
setField(Descriptors.FieldDescriptor field, Object value)
public FewShotExample.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setOutput(GeneratorSuggestion value)
public FewShotExample.Builder setOutput(GeneratorSuggestion value)
Required. Example output of the model.
.google.cloud.dialogflow.v2.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];
setOutput(GeneratorSuggestion.Builder builderForValue)
public FewShotExample.Builder setOutput(GeneratorSuggestion.Builder builderForValue)
Required. Example output of the model.
.google.cloud.dialogflow.v2.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public FewShotExample.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setSummarizationSectionList(SummarizationSectionList value)
public FewShotExample.Builder setSummarizationSectionList(SummarizationSectionList value)
Summarization sections.
.google.cloud.dialogflow.v2.SummarizationSectionList summarization_section_list = 6;
setSummarizationSectionList(SummarizationSectionList.Builder builderForValue)
public FewShotExample.Builder setSummarizationSectionList(SummarizationSectionList.Builder builderForValue)
Summarization sections.
.google.cloud.dialogflow.v2.SummarizationSectionList summarization_section_list = 6;
setUnknownFields(UnknownFieldSet unknownFields)
public final FewShotExample.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides