Class InferenceResponseResult

java.lang.Object
co.elastic.clients.elasticsearch.ml.InferenceResponseResult
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable
public class InferenceResponseResult
extends java.lang.Object
implements JsonpSerializable
See Also:
API specification
  • Field Details

  • Method Details

    • of

      public static InferenceResponseResult of​(java.util.function.Function<InferenceResponseResult.Builder,​ObjectBuilder<InferenceResponseResult>> fn)
    • entities

      public final java.util.List<TrainedModelEntities> entities()
      If the model is trained for named entity recognition (NER) tasks, the response contains the recognized entities.

      API name: entities

    • isTruncated

      @Nullable public final java.lang.Boolean isTruncated()
      Indicates whether the input text was truncated to meet the model's maximum sequence length limit. This property is present only when it is true.

      API name: is_truncated

    • predictedValue

      public final java.util.List<FieldValue> predictedValue()
      If the model is trained for a text classification or zero shot classification task, the response is the predicted class. For named entity recognition (NER) tasks, it contains the annotated text output. For fill mask tasks, it contains the top prediction for replacing the mask token. For text embedding tasks, it contains the raw numerical text embedding values. For regression models, its a numerical value For classification models, it may be an integer, double, boolean or string depending on prediction type

      API name: predicted_value

    • predictedValueSequence

      @Nullable public final java.lang.String predictedValueSequence()
      For fill mask tasks, the response contains the input text sequence with the mask token replaced by the predicted value. Additionally

      API name: predicted_value_sequence

    • predictionProbability

      @Nullable public final java.lang.Double predictionProbability()
      Specifies a probability for the predicted value.

      API name: prediction_probability

    • predictionScore

      @Nullable public final java.lang.Double predictionScore()
      Specifies a confidence score for the predicted value.

      API name: prediction_score

    • topClasses

      public final java.util.List<TopClassEntry> topClasses()
      For fill mask, text classification, and zero shot classification tasks, the response contains a list of top class entries.

      API name: top_classes

    • warning

      @Nullable public final java.lang.String warning()
      If the request failed, the response contains the reason for the failure.

      API name: warning

    • featureImportance

      public final java.util.List<TrainedModelInferenceFeatureImportance> featureImportance()
      The feature importance for the inference results. Relevant only for classification or regression models

      API name: feature_importance

    • 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
    • setupInferenceResponseResultDeserializer

      protected static void setupInferenceResponseResultDeserializer​(ObjectDeserializer<InferenceResponseResult.Builder> op)