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

public class QuestionAnsweringMLInput extends MLInput
MLInput which supports a question answering algorithm Inputs are question and context. Output is the answer
  • Constructor Details

    • QuestionAnsweringMLInput

      public QuestionAnsweringMLInput(FunctionName algorithm, MLInputDataset dataset)
    • 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

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Overrides:
      writeTo in class MLInput
      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:
      toXContent in interface org.opensearch.core.xcontent.ToXContent
      Overrides:
      toXContent in class MLInput
      Throws:
      IOException