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.GeneratedMessageV3.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 Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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.
      • setUnknownFields

        public final EmbeddingModel.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<EmbeddingModel.Builder>
      • mergeUnknownFields

        public final EmbeddingModel.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<EmbeddingModel.Builder>