Package org.opensearch.ml.common.model
Class TextEmbeddingModelConfig
java.lang.Object
org.opensearch.ml.common.model.MLModelConfig
org.opensearch.ml.common.model.TextEmbeddingModelConfig
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.NamedWriteable,org.opensearch.core.common.io.stream.Writeable,org.opensearch.core.xcontent.ToXContent,org.opensearch.core.xcontent.ToXContentObject
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic classNested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final org.opensearch.core.xcontent.NamedXContentRegistry.EntryFields inherited from class org.opensearch.ml.common.model.MLModelConfig
ALL_CONFIG_FIELD, allConfig, MODEL_TYPE_FIELD, modelTypeFields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionTextEmbeddingModelConfig(String modelType, Integer embeddingDimension, TextEmbeddingModelConfig.FrameworkType frameworkType, String allConfig, TextEmbeddingModelConfig.PoolingMode poolingMode, boolean normalizeResult, Integer modelMaxLength) TextEmbeddingModelConfig(String modelType, Integer embeddingDimension, TextEmbeddingModelConfig.FrameworkType frameworkType, String allConfig, TextEmbeddingModelConfig.PoolingMode poolingMode, boolean normalizeResult, Integer modelMaxLength, String queryPrefix, String passagePrefix) TextEmbeddingModelConfig(org.opensearch.core.common.io.stream.StreamInput in) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()booleanstatic TextEmbeddingModelConfigparse(org.opensearch.core.xcontent.XContentParser parser) org.opensearch.core.xcontent.XContentBuildertoXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) voidwriteTo(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class org.opensearch.ml.common.model.MLModelConfig
getAllConfig, getModelType, setAllConfig, setModelTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.core.xcontent.ToXContentObject
isFragment
-
Field Details
-
PARSE_FIELD_NAME
-
XCONTENT_REGISTRY
public static final org.opensearch.core.xcontent.NamedXContentRegistry.Entry XCONTENT_REGISTRY -
EMBEDDING_DIMENSION_FIELD
- See Also:
-
FRAMEWORK_TYPE_FIELD
- See Also:
-
POOLING_MODE_FIELD
- See Also:
-
NORMALIZE_RESULT_FIELD
- See Also:
-
MODEL_MAX_LENGTH_FIELD
- See Also:
-
QUERY_PREFIX
- See Also:
-
PASSAGE_PREFIX
- See Also:
-
-
Constructor Details
-
TextEmbeddingModelConfig
public TextEmbeddingModelConfig(String modelType, Integer embeddingDimension, TextEmbeddingModelConfig.FrameworkType frameworkType, String allConfig, TextEmbeddingModelConfig.PoolingMode poolingMode, boolean normalizeResult, Integer modelMaxLength) -
TextEmbeddingModelConfig
public TextEmbeddingModelConfig(String modelType, Integer embeddingDimension, TextEmbeddingModelConfig.FrameworkType frameworkType, String allConfig, TextEmbeddingModelConfig.PoolingMode poolingMode, boolean normalizeResult, Integer modelMaxLength, String queryPrefix, String passagePrefix) -
TextEmbeddingModelConfig
public TextEmbeddingModelConfig(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Throws:
IOException
-
-
Method Details
-
parse
public static TextEmbeddingModelConfig parse(org.opensearch.core.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
getWriteableName
-
writeTo
- Specified by:
writeToin interfaceorg.opensearch.core.common.io.stream.Writeable- Overrides:
writeToin classMLModelConfig- Throws:
IOException
-
toXContent
public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Throws:
IOException
-
builder
-
toBuilder
-
getEmbeddingDimension
-
getFrameworkType
-
getPoolingMode
-
isNormalizeResult
public boolean isNormalizeResult() -
getModelMaxLength
-
getQueryPrefix
-
getPassagePrefix
-