Class ZeroShotClassificationInferenceOptions

java.lang.Object
co.elastic.clients.elasticsearch.ml.ZeroShotClassificationInferenceOptions
All Implemented Interfaces:
InferenceConfigCreateVariant, JsonpSerializable

@JsonpDeserializable
public class ZeroShotClassificationInferenceOptions
extends java.lang.Object
implements InferenceConfigCreateVariant, JsonpSerializable
Zero shot classification configuration options
See Also:
API specification
  • Field Details

  • Method Details

    • of

    • _inferenceConfigCreateKind

      public InferenceConfigCreate.Kind _inferenceConfigCreateKind()
      InferenceConfigCreate variant kind.
      Specified by:
      _inferenceConfigCreateKind in interface InferenceConfigCreateVariant
    • tokenization

      @Nullable public final TokenizationConfig tokenization()
      The tokenization options to update when inferring

      API name: tokenization

    • hypothesisTemplate

      @Nullable public final java.lang.String hypothesisTemplate()
      Hypothesis template used when tokenizing labels for prediction

      API name: hypothesis_template

    • classificationLabels

      public final java.util.List<java.lang.String> classificationLabels()
      Required - The zero shot classification labels indicating entailment, neutral, and contradiction Must contain exactly and only entailment, neutral, and contradiction

      API name: classification_labels

    • resultsField

      @Nullable public final java.lang.String resultsField()
      The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.

      API name: results_field

    • multiLabel

      @Nullable public final java.lang.Boolean multiLabel()
      Indicates if more than one true label exists.

      API name: multi_label

    • labels

      public final java.util.List<java.lang.String> labels()
      The labels to predict.

      API name: labels

    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • setupZeroShotClassificationInferenceOptionsDeserializer

      protected static void setupZeroShotClassificationInferenceOptionsDeserializer​(ObjectDeserializer<ZeroShotClassificationInferenceOptions.Builder> op)