Class QuestionAnsweringMLInput
java.lang.Object
org.opensearch.ml.common.input.MLInput
org.opensearch.ml.common.input.nlp.QuestionAnsweringMLInput
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable,org.opensearch.core.xcontent.ToXContent,org.opensearch.core.xcontent.ToXContentObject,Input
MLInput which supports a question answering algorithm
Inputs are question and context. Output is the answer
-
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
Fields 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_FIELD, TEXT_DOCS_FIELDFields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionQuestionAnsweringMLInput(org.opensearch.core.common.io.stream.StreamInput in) QuestionAnsweringMLInput(org.opensearch.core.xcontent.XContentParser parser, FunctionName functionName) QuestionAnsweringMLInput(FunctionName algorithm, MLInputDataset dataset) -
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
-
Constructor Details
-
QuestionAnsweringMLInput
-
QuestionAnsweringMLInput
public QuestionAnsweringMLInput(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Throws:
IOException
-
QuestionAnsweringMLInput
public QuestionAnsweringMLInput(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
-