Class FewShotExample (4.59.0)

public final class FewShotExample extends GeneratedMessageV3 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

Static Fields

CONVERSATION_CONTEXT_FIELD_NUMBER

public static final int CONVERSATION_CONTEXT_FIELD_NUMBER
Field Value
Type Description
int

EXTRA_INFO_FIELD_NUMBER

public static final int EXTRA_INFO_FIELD_NUMBER
Field Value
Type Description
int

OUTPUT_FIELD_NUMBER

public static final int OUTPUT_FIELD_NUMBER
Field Value
Type Description
int

SUMMARIZATION_SECTION_LIST_FIELD_NUMBER

public static final int SUMMARIZATION_SECTION_LIST_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static FewShotExample getDefaultInstance()
Returns
Type Description
FewShotExample

getDescriptor()

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

newBuilder()

public static FewShotExample.Builder newBuilder()
Returns
Type Description
FewShotExample.Builder

newBuilder(FewShotExample prototype)

public static FewShotExample.Builder newBuilder(FewShotExample prototype)
Parameter
Name Description
prototype FewShotExample
Returns
Type Description
FewShotExample.Builder

parseDelimitedFrom(InputStream input)

public static FewShotExample parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FewShotExample
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FewShotExample parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FewShotExample
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static FewShotExample parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
FewShotExample
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static FewShotExample parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FewShotExample
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static FewShotExample parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
FewShotExample
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static FewShotExample parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FewShotExample
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static FewShotExample parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
FewShotExample
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static FewShotExample parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FewShotExample
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static FewShotExample parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FewShotExample
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FewShotExample parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FewShotExample
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static FewShotExample parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
FewShotExample
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static FewShotExample parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FewShotExample
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<FewShotExample> parser()
Returns
Type Description
Parser<FewShotExample>

Methods

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

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getConversationContext()

public ConversationContext getConversationContext()

Optional. Conversation transcripts.

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

Returns
Type Description
ConversationContext

The conversationContext.

getConversationContextOrBuilder()

public ConversationContextOrBuilder getConversationContextOrBuilder()

Optional. Conversation transcripts.

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

Returns
Type Description
ConversationContextOrBuilder

getDefaultInstanceForType()

public FewShotExample getDefaultInstanceForType()
Returns
Type Description
FewShotExample

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

getOutput()

public GeneratorSuggestion getOutput()

Required. Example output of the model.

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

Returns
Type Description
GeneratorSuggestion

The output.

getOutputOrBuilder()

public GeneratorSuggestionOrBuilder getOutputOrBuilder()

Required. Example output of the model.

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

Returns
Type Description
GeneratorSuggestionOrBuilder

getParserForType()

public Parser<FewShotExample> getParserForType()
Returns
Type Description
Parser<FewShotExample>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSummarizationSectionList()

public SummarizationSectionList getSummarizationSectionList()

Summarization sections.

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

Returns
Type Description
SummarizationSectionList

The summarizationSectionList.

getSummarizationSectionListOrBuilder()

public SummarizationSectionListOrBuilder getSummarizationSectionListOrBuilder()

Summarization sections.

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

Returns
Type Description
SummarizationSectionListOrBuilder

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

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.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected FewShotExample.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
FewShotExample.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException