Package org.opensearch.ml.common.model
Class QuestionAnsweringModelConfig
java.lang.Object
org.opensearch.ml.common.model.MLModelConfig
org.opensearch.ml.common.model.QuestionAnsweringModelConfig
- 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 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 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
ConstructorsConstructorDescriptionQuestionAnsweringModelConfig(String modelType, QuestionAnsweringModelConfig.FrameworkType frameworkType, String allConfig, boolean normalizeResult, Integer modelMaxLength) QuestionAnsweringModelConfig(org.opensearch.core.common.io.stream.StreamInput in) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()booleanstatic QuestionAnsweringModelConfigparse(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 -
FRAMEWORK_TYPE_FIELD
- See Also:
-
NORMALIZE_RESULT_FIELD
- See Also:
-
MODEL_MAX_LENGTH_FIELD
- See Also:
-
-
Constructor Details
-
QuestionAnsweringModelConfig
public QuestionAnsweringModelConfig(String modelType, QuestionAnsweringModelConfig.FrameworkType frameworkType, String allConfig, boolean normalizeResult, Integer modelMaxLength) -
QuestionAnsweringModelConfig
public QuestionAnsweringModelConfig(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Throws:
IOException
-
-
Method Details
-
parse
public static QuestionAnsweringModelConfig 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
-
getFrameworkType
-
isNormalizeResult
public boolean isNormalizeResult() -
getModelMaxLength
-