Class InferTrainedModelDeploymentResponse
java.lang.Object
co.elastic.clients.elasticsearch.ml.InferTrainedModelDeploymentResponse
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class InferTrainedModelDeploymentResponse extends java.lang.Object implements JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InferTrainedModelDeploymentResponse.Builder
Builder forInferTrainedModelDeploymentResponse
. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<InferTrainedModelDeploymentResponse>
_DESERIALIZER
Json deserializer forInferTrainedModelDeploymentResponse
-
Method Summary
Modifier and Type Method Description java.util.List<TrainedModelEntities>
entities()
If the model is trained for named entity recognition (NER) tasks, the response contains the recognized entities.java.lang.Boolean
isTruncated()
Indicates whether the input text was truncated to meet the model's maximum sequence length limit.static InferTrainedModelDeploymentResponse
of(java.util.function.Function<InferTrainedModelDeploymentResponse.Builder,ObjectBuilder<InferTrainedModelDeploymentResponse>> fn)
java.util.List<java.lang.String>
predictedValue()
If the model is trained for a text classification or zero shot classification task, the response is the predicted class.java.lang.String
predictedValueSequence()
For fill mask tasks, the response contains the input text sequence with the mask token replaced by the predicted value.java.lang.Double
predictionProbability()
Specifies a confidence score for the predicted value.void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
Serialize this object to JSON.protected void
serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupInferTrainedModelDeploymentResponseDeserializer(ObjectDeserializer<InferTrainedModelDeploymentResponse.Builder> op)
java.util.List<TopClassEntry>
topClasses()
Required - For fill mask, text classification, and zero shot classification tasks, the response contains a list of top class entries.java.lang.String
toString()
java.lang.String
warning()
If the request failed, the response contains the reason for the failure.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forInferTrainedModelDeploymentResponse
-
-
Method Details
-
of
public static InferTrainedModelDeploymentResponse of(java.util.function.Function<InferTrainedModelDeploymentResponse.Builder,ObjectBuilder<InferTrainedModelDeploymentResponse>> fn) -
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<java.lang.String> 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.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.API name:
predicted_value_sequence
-
predictionProbability
@Nullable public final java.lang.Double predictionProbability()Specifies a confidence score for the predicted value.API name:
prediction_probability
-
topClasses
Required - 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
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
setupInferTrainedModelDeploymentResponseDeserializer
protected static void setupInferTrainedModelDeploymentResponseDeserializer(ObjectDeserializer<InferTrainedModelDeploymentResponse.Builder> op)
-