Class FewShotExample.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<FewShotExample.Builder>
com.google.cloud.dialogflow.v2.FewShotExample.Builder
All Implemented Interfaces:
FewShotExampleOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
FewShotExample

public static final class FewShotExample.Builder extends com.google.protobuf.GeneratedMessage.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.v2.FewShotExample
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<FewShotExample.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<FewShotExample.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<FewShotExample.Builder>
    • clear

      public FewShotExample.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<FewShotExample.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<FewShotExample.Builder>
    • getDefaultInstanceForType

      public FewShotExample getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public FewShotExample build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public FewShotExample buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public FewShotExample.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<FewShotExample.Builder>
    • mergeFrom

      public FewShotExample.Builder mergeFrom(FewShotExample other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<FewShotExample.Builder>
    • mergeFrom

      public FewShotExample.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<FewShotExample.Builder>
      Throws:
      IOException
    • getInstructionListCase

      public FewShotExample.InstructionListCase getInstructionListCase()
      Specified by:
      getInstructionListCase in interface FewShotExampleOrBuilder
    • clearInstructionList

      public FewShotExample.Builder clearInstructionList()
    • hasConversationContext

      public boolean hasConversationContext()
       Optional. Conversation transcripts.
       
      .google.cloud.dialogflow.v2.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasConversationContext in interface FewShotExampleOrBuilder
      Returns:
      Whether the conversationContext field is set.
    • getConversationContext

      public ConversationContext getConversationContext()
       Optional. Conversation transcripts.
       
      .google.cloud.dialogflow.v2.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getConversationContext in interface FewShotExampleOrBuilder
      Returns:
      The conversationContext.
    • setConversationContext

      public FewShotExample.Builder setConversationContext(ConversationContext value)
       Optional. Conversation transcripts.
       
      .google.cloud.dialogflow.v2.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];
    • setConversationContext

      public FewShotExample.Builder setConversationContext(ConversationContext.Builder builderForValue)
       Optional. Conversation transcripts.
       
      .google.cloud.dialogflow.v2.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];
    • mergeConversationContext

      public FewShotExample.Builder mergeConversationContext(ConversationContext value)
       Optional. Conversation transcripts.
       
      .google.cloud.dialogflow.v2.ConversationContext conversation_context = 3 [(.google.api.field_behavior) = OPTIONAL];
    • clearConversationContext

      public FewShotExample.Builder clearConversationContext()
       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];
      Specified by:
      getConversationContextOrBuilder in interface FewShotExampleOrBuilder
    • getExtraInfoCount

      public int getExtraInfoCount()
      Description copied from interface: FewShotExampleOrBuilder
       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];
      Specified by:
      getExtraInfoCount in interface FewShotExampleOrBuilder
    • containsExtraInfo

      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];
      Specified by:
      containsExtraInfo in interface FewShotExampleOrBuilder
    • getExtraInfo

      @Deprecated public Map<String,String> getExtraInfo()
      Deprecated.
      Use getExtraInfoMap() instead.
      Specified by:
      getExtraInfo in interface FewShotExampleOrBuilder
    • 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];
      Specified by:
      getExtraInfoMap in interface FewShotExampleOrBuilder
    • getExtraInfoOrDefault

      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];
      Specified by:
      getExtraInfoOrDefault in interface FewShotExampleOrBuilder
    • getExtraInfoOrThrow

      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];
      Specified by:
      getExtraInfoOrThrow in interface FewShotExampleOrBuilder
    • clearExtraInfo

      public FewShotExample.Builder clearExtraInfo()
    • removeExtraInfo

      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];
    • getMutableExtraInfo

      @Deprecated public Map<String,String> getMutableExtraInfo()
      Deprecated.
      Use alternate mutation accessors instead.
    • putExtraInfo

      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];
    • putAllExtraInfo

      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];
    • hasSummarizationSectionList

      public boolean hasSummarizationSectionList()
       Summarization sections.
       
      .google.cloud.dialogflow.v2.SummarizationSectionList summarization_section_list = 6;
      Specified by:
      hasSummarizationSectionList in interface FewShotExampleOrBuilder
      Returns:
      Whether the summarizationSectionList field is set.
    • getSummarizationSectionList

      public SummarizationSectionList getSummarizationSectionList()
       Summarization sections.
       
      .google.cloud.dialogflow.v2.SummarizationSectionList summarization_section_list = 6;
      Specified by:
      getSummarizationSectionList in interface FewShotExampleOrBuilder
      Returns:
      The summarizationSectionList.
    • setSummarizationSectionList

      public FewShotExample.Builder setSummarizationSectionList(SummarizationSectionList value)
       Summarization sections.
       
      .google.cloud.dialogflow.v2.SummarizationSectionList summarization_section_list = 6;
    • setSummarizationSectionList

      public FewShotExample.Builder setSummarizationSectionList(SummarizationSectionList.Builder builderForValue)
       Summarization sections.
       
      .google.cloud.dialogflow.v2.SummarizationSectionList summarization_section_list = 6;
    • mergeSummarizationSectionList

      public FewShotExample.Builder mergeSummarizationSectionList(SummarizationSectionList value)
       Summarization sections.
       
      .google.cloud.dialogflow.v2.SummarizationSectionList summarization_section_list = 6;
    • clearSummarizationSectionList

      public FewShotExample.Builder clearSummarizationSectionList()
       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;
      Specified by:
      getSummarizationSectionListOrBuilder in interface FewShotExampleOrBuilder
    • hasOutput

      public boolean hasOutput()
       Required. Example output of the model.
       
      .google.cloud.dialogflow.v2.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasOutput in interface FewShotExampleOrBuilder
      Returns:
      Whether the output field is set.
    • getOutput

      public GeneratorSuggestion getOutput()
       Required. Example output of the model.
       
      .google.cloud.dialogflow.v2.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getOutput in interface FewShotExampleOrBuilder
      Returns:
      The output.
    • setOutput

      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

      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];
    • mergeOutput

      public FewShotExample.Builder mergeOutput(GeneratorSuggestion value)
       Required. Example output of the model.
       
      .google.cloud.dialogflow.v2.GeneratorSuggestion output = 7 [(.google.api.field_behavior) = REQUIRED];
    • clearOutput

      public FewShotExample.Builder clearOutput()
       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];
      Specified by:
      getOutputOrBuilder in interface FewShotExampleOrBuilder