Class InferTrainedModelRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.ml.InferTrainedModelRequest
- All Implemented Interfaces:
- JsonpSerializable
@JsonpDeserializable
public class InferTrainedModelRequest
extends RequestBase
implements JsonpSerializable
Evaluate a trained model.
- See Also:
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBaseRequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<InferTrainedModelRequest>Json deserializer forInferTrainedModelRequestEndpoint "ml.infer_trained_model".
- 
Method SummaryModifier and TypeMethodDescriptiondocs()Required - An array of objects to pass to the model for inference.final InferenceConfigUpdateThe inference configuration updates to apply on the API callfinal StringmodelId()Required - The unique identifier of the trained model.static InferTrainedModelRequestvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal Timetimeout()Controls the amount of time to wait for inference results.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBasetoString
- 
Field Details- 
_DESERIALIZERJson deserializer forInferTrainedModelRequest
- 
_ENDPOINTpublic static final Endpoint<InferTrainedModelRequest,InferTrainedModelResponse, _ENDPOINTErrorResponse> Endpoint "ml.infer_trained_model".
 
- 
- 
Method Details- 
ofpublic static InferTrainedModelRequest of(Function<InferTrainedModelRequest.Builder, ObjectBuilder<InferTrainedModelRequest>> fn) 
- 
docsRequired - An array of objects to pass to the model for inference. The objects should contain a fields matching your configured trained model input. Typically, for NLP models, the field name istext_field. Currently, for NLP models, only a single value is allowed.API name: docs
- 
inferenceConfigThe inference configuration updates to apply on the API callAPI name: inference_config
- 
modelIdRequired - The unique identifier of the trained model.API name: model_id
- 
timeoutControls the amount of time to wait for inference results.API name: timeout
- 
serializeSerialize this object to JSON.- Specified by:
- serializein interface- JsonpSerializable
 
- 
serializeInternal
- 
setupInferTrainedModelRequestDeserializerprotected static void setupInferTrainedModelRequestDeserializer(ObjectDeserializer<InferTrainedModelRequest.Builder> op) 
 
-