Class EmbeddingModel.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, EmbeddingModelOrBuilder, java.lang.Cloneable
    Enclosing class:
    EmbeddingModel

    public static final class EmbeddingModel.Builder
    extends com.google.protobuf.GeneratedMessage.Builder<EmbeddingModel.Builder>
    implements EmbeddingModelOrBuilder
     Specification of one model that is used to generate embeddings for strings.
     
    Protobuf type arg_services.nlp.v1.EmbeddingModel
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      EmbeddingModel build()  
      EmbeddingModel buildPartial()  
      EmbeddingModel.Builder clear()  
      EmbeddingModel.Builder clearModelName()
      You have to specify the name of the model that should be used by the selected impelemtation (i.e., `model_type`).
      EmbeddingModel.Builder clearModelType()
      Each embedding has to be implemented, thus this enum is used to select the correct one.
      EmbeddingModel.Builder clearPmean()
      Power mean (or generalized mean).
      EmbeddingModel.Builder clearPooling()  
      EmbeddingModel.Builder clearPoolingType()
      Standard pooling functions like mean, min, max.
      EmbeddingModel getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      java.lang.String getModelName()
      You have to specify the name of the model that should be used by the selected impelemtation (i.e., `model_type`).
      com.google.protobuf.ByteString getModelNameBytes()
      You have to specify the name of the model that should be used by the selected impelemtation (i.e., `model_type`).
      EmbeddingType getModelType()
      Each embedding has to be implemented, thus this enum is used to select the correct one.
      int getModelTypeValue()
      Each embedding has to be implemented, thus this enum is used to select the correct one.
      double getPmean()
      Power mean (or generalized mean).
      EmbeddingModel.PoolingCase getPoolingCase()  
      Pooling getPoolingType()
      Standard pooling functions like mean, min, max.
      int getPoolingTypeValue()
      Standard pooling functions like mean, min, max.
      boolean hasPmean()
      Power mean (or generalized mean).
      boolean hasPoolingType()
      Standard pooling functions like mean, min, max.
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      EmbeddingModel.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      EmbeddingModel.Builder mergeFrom​(com.google.protobuf.Message other)  
      EmbeddingModel.Builder mergeFrom​(EmbeddingModel other)  
      EmbeddingModel.Builder setModelName​(java.lang.String value)
      You have to specify the name of the model that should be used by the selected impelemtation (i.e., `model_type`).
      EmbeddingModel.Builder setModelNameBytes​(com.google.protobuf.ByteString value)
      You have to specify the name of the model that should be used by the selected impelemtation (i.e., `model_type`).
      EmbeddingModel.Builder setModelType​(EmbeddingType value)
      Each embedding has to be implemented, thus this enum is used to select the correct one.
      EmbeddingModel.Builder setModelTypeValue​(int value)
      Each embedding has to be implemented, thus this enum is used to select the correct one.
      EmbeddingModel.Builder setPmean​(double value)
      Power mean (or generalized mean).
      EmbeddingModel.Builder setPoolingType​(Pooling value)
      Standard pooling functions like mean, min, max.
      EmbeddingModel.Builder setPoolingTypeValue​(int value)
      Standard pooling functions like mean, min, max.
      • Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

        addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
      • Methods inherited from class com.google.protobuf.AbstractMessage.Builder

        findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

        addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.protobuf.Message.Builder

        mergeDelimitedFrom, mergeDelimitedFrom
      • Methods inherited from interface com.google.protobuf.MessageLite.Builder

        mergeFrom
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • 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<EmbeddingModel.Builder>
      • clear

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

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

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

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

        public EmbeddingModel.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<EmbeddingModel.Builder>
      • isInitialized

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

        public EmbeddingModel.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws java.io.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<EmbeddingModel.Builder>
        Throws:
        java.io.IOException
      • getModelTypeValue

        public int getModelTypeValue()
         Each embedding has to be implemented, thus this enum is used to select the correct one.
         
        .arg_services.nlp.v1.EmbeddingType model_type = 1 [json_name = "modelType"];
        Specified by:
        getModelTypeValue in interface EmbeddingModelOrBuilder
        Returns:
        The enum numeric value on the wire for modelType.
      • setModelTypeValue

        public EmbeddingModel.Builder setModelTypeValue​(int value)
         Each embedding has to be implemented, thus this enum is used to select the correct one.
         
        .arg_services.nlp.v1.EmbeddingType model_type = 1 [json_name = "modelType"];
        Parameters:
        value - The enum numeric value on the wire for modelType to set.
        Returns:
        This builder for chaining.
      • getModelType

        public EmbeddingType getModelType()
         Each embedding has to be implemented, thus this enum is used to select the correct one.
         
        .arg_services.nlp.v1.EmbeddingType model_type = 1 [json_name = "modelType"];
        Specified by:
        getModelType in interface EmbeddingModelOrBuilder
        Returns:
        The modelType.
      • setModelType

        public EmbeddingModel.Builder setModelType​(EmbeddingType value)
         Each embedding has to be implemented, thus this enum is used to select the correct one.
         
        .arg_services.nlp.v1.EmbeddingType model_type = 1 [json_name = "modelType"];
        Parameters:
        value - The modelType to set.
        Returns:
        This builder for chaining.
      • clearModelType

        public EmbeddingModel.Builder clearModelType()
         Each embedding has to be implemented, thus this enum is used to select the correct one.
         
        .arg_services.nlp.v1.EmbeddingType model_type = 1 [json_name = "modelType"];
        Returns:
        This builder for chaining.
      • getModelName

        public java.lang.String getModelName()
         You have to specify the name of the model that should be used by the selected impelemtation (i.e., `model_type`).
         We provide links to exemplary models for each implementation in the documentation of `EmbeddingType`.
         
        string model_name = 2 [json_name = "modelName"];
        Specified by:
        getModelName in interface EmbeddingModelOrBuilder
        Returns:
        The modelName.
      • getModelNameBytes

        public com.google.protobuf.ByteString getModelNameBytes()
         You have to specify the name of the model that should be used by the selected impelemtation (i.e., `model_type`).
         We provide links to exemplary models for each implementation in the documentation of `EmbeddingType`.
         
        string model_name = 2 [json_name = "modelName"];
        Specified by:
        getModelNameBytes in interface EmbeddingModelOrBuilder
        Returns:
        The bytes for modelName.
      • setModelName

        public EmbeddingModel.Builder setModelName​(java.lang.String value)
         You have to specify the name of the model that should be used by the selected impelemtation (i.e., `model_type`).
         We provide links to exemplary models for each implementation in the documentation of `EmbeddingType`.
         
        string model_name = 2 [json_name = "modelName"];
        Parameters:
        value - The modelName to set.
        Returns:
        This builder for chaining.
      • clearModelName

        public EmbeddingModel.Builder clearModelName()
         You have to specify the name of the model that should be used by the selected impelemtation (i.e., `model_type`).
         We provide links to exemplary models for each implementation in the documentation of `EmbeddingType`.
         
        string model_name = 2 [json_name = "modelName"];
        Returns:
        This builder for chaining.
      • setModelNameBytes

        public EmbeddingModel.Builder setModelNameBytes​(com.google.protobuf.ByteString value)
         You have to specify the name of the model that should be used by the selected impelemtation (i.e., `model_type`).
         We provide links to exemplary models for each implementation in the documentation of `EmbeddingType`.
         
        string model_name = 2 [json_name = "modelName"];
        Parameters:
        value - The bytes for modelName to set.
        Returns:
        This builder for chaining.
      • hasPoolingType

        public boolean hasPoolingType()
         Standard pooling functions like mean, min, max.
         
        .arg_services.nlp.v1.Pooling pooling_type = 3 [json_name = "poolingType"];
        Specified by:
        hasPoolingType in interface EmbeddingModelOrBuilder
        Returns:
        Whether the poolingType field is set.
      • getPoolingTypeValue

        public int getPoolingTypeValue()
         Standard pooling functions like mean, min, max.
         
        .arg_services.nlp.v1.Pooling pooling_type = 3 [json_name = "poolingType"];
        Specified by:
        getPoolingTypeValue in interface EmbeddingModelOrBuilder
        Returns:
        The enum numeric value on the wire for poolingType.
      • setPoolingTypeValue

        public EmbeddingModel.Builder setPoolingTypeValue​(int value)
         Standard pooling functions like mean, min, max.
         
        .arg_services.nlp.v1.Pooling pooling_type = 3 [json_name = "poolingType"];
        Parameters:
        value - The enum numeric value on the wire for poolingType to set.
        Returns:
        This builder for chaining.
      • getPoolingType

        public Pooling getPoolingType()
         Standard pooling functions like mean, min, max.
         
        .arg_services.nlp.v1.Pooling pooling_type = 3 [json_name = "poolingType"];
        Specified by:
        getPoolingType in interface EmbeddingModelOrBuilder
        Returns:
        The poolingType.
      • setPoolingType

        public EmbeddingModel.Builder setPoolingType​(Pooling value)
         Standard pooling functions like mean, min, max.
         
        .arg_services.nlp.v1.Pooling pooling_type = 3 [json_name = "poolingType"];
        Parameters:
        value - The poolingType to set.
        Returns:
        This builder for chaining.
      • clearPoolingType

        public EmbeddingModel.Builder clearPoolingType()
         Standard pooling functions like mean, min, max.
         
        .arg_services.nlp.v1.Pooling pooling_type = 3 [json_name = "poolingType"];
        Returns:
        This builder for chaining.
      • hasPmean

        public boolean hasPmean()
         Power mean (or generalized mean).
         This method allows you to alter the computation of the mean representation.
         Special cases include arithmetic mean (p = 1), geometric mean (p = 0), harmonic mean (p = -1), minimum (p = -∞), maximum (p = ∞).
         [Wikipedia](https://en.wikipedia.org/wiki/Generalized_mean).
         [Paper](https://arxiv.org/abs/1803.01400).
         
        double pmean = 4 [json_name = "pmean"];
        Specified by:
        hasPmean in interface EmbeddingModelOrBuilder
        Returns:
        Whether the pmean field is set.
      • getPmean

        public double getPmean()
         Power mean (or generalized mean).
         This method allows you to alter the computation of the mean representation.
         Special cases include arithmetic mean (p = 1), geometric mean (p = 0), harmonic mean (p = -1), minimum (p = -∞), maximum (p = ∞).
         [Wikipedia](https://en.wikipedia.org/wiki/Generalized_mean).
         [Paper](https://arxiv.org/abs/1803.01400).
         
        double pmean = 4 [json_name = "pmean"];
        Specified by:
        getPmean in interface EmbeddingModelOrBuilder
        Returns:
        The pmean.
      • setPmean

        public EmbeddingModel.Builder setPmean​(double value)
         Power mean (or generalized mean).
         This method allows you to alter the computation of the mean representation.
         Special cases include arithmetic mean (p = 1), geometric mean (p = 0), harmonic mean (p = -1), minimum (p = -∞), maximum (p = ∞).
         [Wikipedia](https://en.wikipedia.org/wiki/Generalized_mean).
         [Paper](https://arxiv.org/abs/1803.01400).
         
        double pmean = 4 [json_name = "pmean"];
        Parameters:
        value - The pmean to set.
        Returns:
        This builder for chaining.
      • clearPmean

        public EmbeddingModel.Builder clearPmean()
         Power mean (or generalized mean).
         This method allows you to alter the computation of the mean representation.
         Special cases include arithmetic mean (p = 1), geometric mean (p = 0), harmonic mean (p = -1), minimum (p = -∞), maximum (p = ∞).
         [Wikipedia](https://en.wikipedia.org/wiki/Generalized_mean).
         [Paper](https://arxiv.org/abs/1803.01400).
         
        double pmean = 4 [json_name = "pmean"];
        Returns:
        This builder for chaining.