Class Generator.ModelParameter.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Generator.ModelParameter.Builder>
com.google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter.Builder
All Implemented Interfaces:
Generator.ModelParameterOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Generator.ModelParameter

public static final class Generator.ModelParameter.Builder extends com.google.protobuf.GeneratedMessage.Builder<Generator.ModelParameter.Builder> implements Generator.ModelParameterOrBuilder
 Parameters to be passed to the LLM. If not set, default values will be
 used.
 
Protobuf type google.cloud.dialogflow.cx.v3beta1.Generator.ModelParameter
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Generator.ModelParameter.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<Generator.ModelParameter.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<Generator.ModelParameter.Builder>
    • getDefaultInstanceForType

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

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

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

      public Generator.ModelParameter.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<Generator.ModelParameter.Builder>
    • mergeFrom

    • isInitialized

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

      public Generator.ModelParameter.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<Generator.ModelParameter.Builder>
      Throws:
      IOException
    • hasTemperature

      public boolean hasTemperature()
       The temperature used for sampling. Temperature sampling occurs after both
       topP and topK have been applied.
       Valid range: [0.0, 1.0]
       Low temperature = less random. High temperature = more random.
       
      optional float temperature = 1;
      Specified by:
      hasTemperature in interface Generator.ModelParameterOrBuilder
      Returns:
      Whether the temperature field is set.
    • getTemperature

      public float getTemperature()
       The temperature used for sampling. Temperature sampling occurs after both
       topP and topK have been applied.
       Valid range: [0.0, 1.0]
       Low temperature = less random. High temperature = more random.
       
      optional float temperature = 1;
      Specified by:
      getTemperature in interface Generator.ModelParameterOrBuilder
      Returns:
      The temperature.
    • setTemperature

      public Generator.ModelParameter.Builder setTemperature(float value)
       The temperature used for sampling. Temperature sampling occurs after both
       topP and topK have been applied.
       Valid range: [0.0, 1.0]
       Low temperature = less random. High temperature = more random.
       
      optional float temperature = 1;
      Parameters:
      value - The temperature to set.
      Returns:
      This builder for chaining.
    • clearTemperature

      public Generator.ModelParameter.Builder clearTemperature()
       The temperature used for sampling. Temperature sampling occurs after both
       topP and topK have been applied.
       Valid range: [0.0, 1.0]
       Low temperature = less random. High temperature = more random.
       
      optional float temperature = 1;
      Returns:
      This builder for chaining.
    • hasMaxDecodeSteps

      public boolean hasMaxDecodeSteps()
       The maximum number of tokens to generate.
       
      optional int32 max_decode_steps = 2;
      Specified by:
      hasMaxDecodeSteps in interface Generator.ModelParameterOrBuilder
      Returns:
      Whether the maxDecodeSteps field is set.
    • getMaxDecodeSteps

      public int getMaxDecodeSteps()
       The maximum number of tokens to generate.
       
      optional int32 max_decode_steps = 2;
      Specified by:
      getMaxDecodeSteps in interface Generator.ModelParameterOrBuilder
      Returns:
      The maxDecodeSteps.
    • setMaxDecodeSteps

      public Generator.ModelParameter.Builder setMaxDecodeSteps(int value)
       The maximum number of tokens to generate.
       
      optional int32 max_decode_steps = 2;
      Parameters:
      value - The maxDecodeSteps to set.
      Returns:
      This builder for chaining.
    • clearMaxDecodeSteps

      public Generator.ModelParameter.Builder clearMaxDecodeSteps()
       The maximum number of tokens to generate.
       
      optional int32 max_decode_steps = 2;
      Returns:
      This builder for chaining.
    • hasTopP

      public boolean hasTopP()
       If set, only the tokens comprising the top top_p probability mass are
       considered. If both top_p and top_k are
       set, top_p will be used for further refining candidates selected with
       top_k.
       Valid range: (0.0, 1.0].
       Small topP = less random. Large topP = more random.
       
      optional float top_p = 3;
      Specified by:
      hasTopP in interface Generator.ModelParameterOrBuilder
      Returns:
      Whether the topP field is set.
    • getTopP

      public float getTopP()
       If set, only the tokens comprising the top top_p probability mass are
       considered. If both top_p and top_k are
       set, top_p will be used for further refining candidates selected with
       top_k.
       Valid range: (0.0, 1.0].
       Small topP = less random. Large topP = more random.
       
      optional float top_p = 3;
      Specified by:
      getTopP in interface Generator.ModelParameterOrBuilder
      Returns:
      The topP.
    • setTopP

      public Generator.ModelParameter.Builder setTopP(float value)
       If set, only the tokens comprising the top top_p probability mass are
       considered. If both top_p and top_k are
       set, top_p will be used for further refining candidates selected with
       top_k.
       Valid range: (0.0, 1.0].
       Small topP = less random. Large topP = more random.
       
      optional float top_p = 3;
      Parameters:
      value - The topP to set.
      Returns:
      This builder for chaining.
    • clearTopP

       If set, only the tokens comprising the top top_p probability mass are
       considered. If both top_p and top_k are
       set, top_p will be used for further refining candidates selected with
       top_k.
       Valid range: (0.0, 1.0].
       Small topP = less random. Large topP = more random.
       
      optional float top_p = 3;
      Returns:
      This builder for chaining.
    • hasTopK

      public boolean hasTopK()
       If set, the sampling process in each step is limited to the top_k tokens
       with highest probabilities.
       Valid range: [1, 40] or 1000+.
       Small topK = less random. Large topK = more random.
       
      optional int32 top_k = 4;
      Specified by:
      hasTopK in interface Generator.ModelParameterOrBuilder
      Returns:
      Whether the topK field is set.
    • getTopK

      public int getTopK()
       If set, the sampling process in each step is limited to the top_k tokens
       with highest probabilities.
       Valid range: [1, 40] or 1000+.
       Small topK = less random. Large topK = more random.
       
      optional int32 top_k = 4;
      Specified by:
      getTopK in interface Generator.ModelParameterOrBuilder
      Returns:
      The topK.
    • setTopK

      public Generator.ModelParameter.Builder setTopK(int value)
       If set, the sampling process in each step is limited to the top_k tokens
       with highest probabilities.
       Valid range: [1, 40] or 1000+.
       Small topK = less random. Large topK = more random.
       
      optional int32 top_k = 4;
      Parameters:
      value - The topK to set.
      Returns:
      This builder for chaining.
    • clearTopK

       If set, the sampling process in each step is limited to the top_k tokens
       with highest probabilities.
       Valid range: [1, 40] or 1000+.
       Small topK = less random. Large topK = more random.
       
      optional int32 top_k = 4;
      Returns:
      This builder for chaining.