Class TextDocsMLInput
java.lang.Object
org.opensearch.ml.common.input.MLInput
org.opensearch.ml.common.input.nlp.TextDocsMLInput
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable,org.opensearch.core.xcontent.ToXContent,org.opensearch.core.xcontent.ToXContentObject,Input
ML input class which supports a list fo text docs.
This class can be used for TEXT_EMBEDDING model.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensearch.ml.common.input.MLInput
MLInput.MLInputBuilderNested 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
FieldsFields inherited from class org.opensearch.ml.common.input.MLInput
algorithm, ALGORITHM_FIELD, CONTEXT_FIELD, INPUT_DATA_FIELD, INPUT_INDEX_FIELD, INPUT_QUERY_FIELD, inputDataset, ML_PARAMETERS_FIELD, parameters, PARAMETERS_FIELD, QUERY_TEXT_FIELD, QUESTION_FIELD, RETURN_BYTES_FIELD, RETURN_NUMBER_FIELD, TARGET_RESPONSE_FIELD, TARGET_RESPONSE_POSITIONS_FIELDFields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionTextDocsMLInput(org.opensearch.core.common.io.stream.StreamInput in) TextDocsMLInput(org.opensearch.core.xcontent.XContentParser parser, FunctionName functionName) TextDocsMLInput(FunctionName algorithm, MLInputDataset inputDataset) -
Method Summary
Modifier and TypeMethodDescriptionorg.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.input.MLInput
builder, canEqual, equals, getAlgorithm, getFunctionName, getInputDataset, getParameters, getVersion, hashCode, parse, setAlgorithm, setInputDataset, setParameters, setVersion, toBuilder, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensearch.core.xcontent.ToXContentObject
isFragment
-
Field Details
-
TEXT_DOCS_FIELD
- See Also:
-
RESULT_FILTER_FIELD
- See Also:
-
-
Constructor Details
-
TextDocsMLInput
-
TextDocsMLInput
- Throws:
IOException
-
TextDocsMLInput
public TextDocsMLInput(org.opensearch.core.xcontent.XContentParser parser, FunctionName functionName) throws IOException - Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceorg.opensearch.core.common.io.stream.Writeable- Overrides:
writeToin classMLInput- 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 - Specified by:
toXContentin interfaceorg.opensearch.core.xcontent.ToXContent- Overrides:
toXContentin classMLInput- Throws:
IOException
-