Class AutoraterConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AutoraterConfig.Builder>
com.google.cloud.aiplatform.v1.AutoraterConfig.Builder
All Implemented Interfaces:
AutoraterConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AutoraterConfig

public static final class AutoraterConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<AutoraterConfig.Builder> implements AutoraterConfigOrBuilder
 The configs for autorater. This is applicable to both EvaluateInstances and
 EvaluateDataset.
 
Protobuf type google.cloud.aiplatform.v1.AutoraterConfig
  • 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<AutoraterConfig.Builder>
    • clear

      public AutoraterConfig.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<AutoraterConfig.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<AutoraterConfig.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public AutoraterConfig.Builder mergeFrom(AutoraterConfig other)
    • isInitialized

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

      public AutoraterConfig.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<AutoraterConfig.Builder>
      Throws:
      IOException
    • hasSamplingCount

      public boolean hasSamplingCount()
       Optional. Number of samples for each instance in the dataset.
       If not specified, the default is 4. Minimum value is 1, maximum value
       is 32.
       
      optional int32 sampling_count = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasSamplingCount in interface AutoraterConfigOrBuilder
      Returns:
      Whether the samplingCount field is set.
    • getSamplingCount

      public int getSamplingCount()
       Optional. Number of samples for each instance in the dataset.
       If not specified, the default is 4. Minimum value is 1, maximum value
       is 32.
       
      optional int32 sampling_count = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSamplingCount in interface AutoraterConfigOrBuilder
      Returns:
      The samplingCount.
    • setSamplingCount

      public AutoraterConfig.Builder setSamplingCount(int value)
       Optional. Number of samples for each instance in the dataset.
       If not specified, the default is 4. Minimum value is 1, maximum value
       is 32.
       
      optional int32 sampling_count = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The samplingCount to set.
      Returns:
      This builder for chaining.
    • clearSamplingCount

      public AutoraterConfig.Builder clearSamplingCount()
       Optional. Number of samples for each instance in the dataset.
       If not specified, the default is 4. Minimum value is 1, maximum value
       is 32.
       
      optional int32 sampling_count = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • hasFlipEnabled

      public boolean hasFlipEnabled()
       Optional. Default is true. Whether to flip the candidate and baseline
       responses. This is only applicable to the pairwise metric. If enabled, also
       provide PairwiseMetricSpec.candidate_response_field_name and
       PairwiseMetricSpec.baseline_response_field_name. When rendering
       PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
       fields will be flipped for half of the samples to reduce bias.
       
      optional bool flip_enabled = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasFlipEnabled in interface AutoraterConfigOrBuilder
      Returns:
      Whether the flipEnabled field is set.
    • getFlipEnabled

      public boolean getFlipEnabled()
       Optional. Default is true. Whether to flip the candidate and baseline
       responses. This is only applicable to the pairwise metric. If enabled, also
       provide PairwiseMetricSpec.candidate_response_field_name and
       PairwiseMetricSpec.baseline_response_field_name. When rendering
       PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
       fields will be flipped for half of the samples to reduce bias.
       
      optional bool flip_enabled = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFlipEnabled in interface AutoraterConfigOrBuilder
      Returns:
      The flipEnabled.
    • setFlipEnabled

      public AutoraterConfig.Builder setFlipEnabled(boolean value)
       Optional. Default is true. Whether to flip the candidate and baseline
       responses. This is only applicable to the pairwise metric. If enabled, also
       provide PairwiseMetricSpec.candidate_response_field_name and
       PairwiseMetricSpec.baseline_response_field_name. When rendering
       PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
       fields will be flipped for half of the samples to reduce bias.
       
      optional bool flip_enabled = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The flipEnabled to set.
      Returns:
      This builder for chaining.
    • clearFlipEnabled

      public AutoraterConfig.Builder clearFlipEnabled()
       Optional. Default is true. Whether to flip the candidate and baseline
       responses. This is only applicable to the pairwise metric. If enabled, also
       provide PairwiseMetricSpec.candidate_response_field_name and
       PairwiseMetricSpec.baseline_response_field_name. When rendering
       PairwiseMetricSpec.metric_prompt_template, the candidate and baseline
       fields will be flipped for half of the samples to reduce bias.
       
      optional bool flip_enabled = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getAutoraterModel

      public String getAutoraterModel()
       Optional. The fully qualified name of the publisher model or tuned
       autorater endpoint to use.
      
       Publisher model format:
       `projects/{project}/locations/{location}/publishers/*/models/*`
      
       Tuned model endpoint format:
       `projects/{project}/locations/{location}/endpoints/{endpoint}`
       
      string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAutoraterModel in interface AutoraterConfigOrBuilder
      Returns:
      The autoraterModel.
    • getAutoraterModelBytes

      public com.google.protobuf.ByteString getAutoraterModelBytes()
       Optional. The fully qualified name of the publisher model or tuned
       autorater endpoint to use.
      
       Publisher model format:
       `projects/{project}/locations/{location}/publishers/*/models/*`
      
       Tuned model endpoint format:
       `projects/{project}/locations/{location}/endpoints/{endpoint}`
       
      string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAutoraterModelBytes in interface AutoraterConfigOrBuilder
      Returns:
      The bytes for autoraterModel.
    • setAutoraterModel

      public AutoraterConfig.Builder setAutoraterModel(String value)
       Optional. The fully qualified name of the publisher model or tuned
       autorater endpoint to use.
      
       Publisher model format:
       `projects/{project}/locations/{location}/publishers/*/models/*`
      
       Tuned model endpoint format:
       `projects/{project}/locations/{location}/endpoints/{endpoint}`
       
      string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The autoraterModel to set.
      Returns:
      This builder for chaining.
    • clearAutoraterModel

      public AutoraterConfig.Builder clearAutoraterModel()
       Optional. The fully qualified name of the publisher model or tuned
       autorater endpoint to use.
      
       Publisher model format:
       `projects/{project}/locations/{location}/publishers/*/models/*`
      
       Tuned model endpoint format:
       `projects/{project}/locations/{location}/endpoints/{endpoint}`
       
      string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setAutoraterModelBytes

      public AutoraterConfig.Builder setAutoraterModelBytes(com.google.protobuf.ByteString value)
       Optional. The fully qualified name of the publisher model or tuned
       autorater endpoint to use.
      
       Publisher model format:
       `projects/{project}/locations/{location}/publishers/*/models/*`
      
       Tuned model endpoint format:
       `projects/{project}/locations/{location}/endpoints/{endpoint}`
       
      string autorater_model = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for autoraterModel to set.
      Returns:
      This builder for chaining.
    • hasGenerationConfig

      public boolean hasGenerationConfig()
       Optional. Configuration options for model generation and outputs.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasGenerationConfig in interface AutoraterConfigOrBuilder
      Returns:
      Whether the generationConfig field is set.
    • getGenerationConfig

      public GenerationConfig getGenerationConfig()
       Optional. Configuration options for model generation and outputs.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGenerationConfig in interface AutoraterConfigOrBuilder
      Returns:
      The generationConfig.
    • setGenerationConfig

      public AutoraterConfig.Builder setGenerationConfig(GenerationConfig value)
       Optional. Configuration options for model generation and outputs.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
    • setGenerationConfig

      public AutoraterConfig.Builder setGenerationConfig(GenerationConfig.Builder builderForValue)
       Optional. Configuration options for model generation and outputs.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
    • mergeGenerationConfig

      public AutoraterConfig.Builder mergeGenerationConfig(GenerationConfig value)
       Optional. Configuration options for model generation and outputs.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
    • clearGenerationConfig

      public AutoraterConfig.Builder clearGenerationConfig()
       Optional. Configuration options for model generation and outputs.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getGenerationConfigBuilder

      public GenerationConfig.Builder getGenerationConfigBuilder()
       Optional. Configuration options for model generation and outputs.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getGenerationConfigOrBuilder

      public GenerationConfigOrBuilder getGenerationConfigOrBuilder()
       Optional. Configuration options for model generation and outputs.
       
      .google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGenerationConfigOrBuilder in interface AutoraterConfigOrBuilder