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
Evaluates a trained model.
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInferTrainedModelRequest.BuilderBuilder forInferTrainedModelRequest.Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<InferTrainedModelRequest>_DESERIALIZERJson deserializer forInferTrainedModelRequeststatic Endpoint<InferTrainedModelRequest,InferTrainedModelResponse,ErrorResponse>_ENDPOINTEndpoint "ml.infer_trained_model". -
Method Summary
Modifier and Type Method Description java.util.List<java.util.Map<java.lang.String,JsonData>>docs()Required - An array of objects to pass to the model for inference.InferenceConfigUpdateinferenceConfig()The inference configuration updates to apply on the API calljava.lang.StringmodelId()Required - The unique identifier of the trained model.static InferTrainedModelRequestof(java.util.function.Function<InferTrainedModelRequest.Builder,ObjectBuilder<InferTrainedModelRequest>> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupInferTrainedModelRequestDeserializer(ObjectDeserializer<InferTrainedModelRequest.Builder> op)Timetimeout()Controls the amount of time to wait for inference results.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forInferTrainedModelRequest -
_ENDPOINT
public static final Endpoint<InferTrainedModelRequest,InferTrainedModelResponse,ErrorResponse> _ENDPOINTEndpoint "ml.infer_trained_model".
-
-
Method Details
-
of
public static InferTrainedModelRequest of(java.util.function.Function<InferTrainedModelRequest.Builder,ObjectBuilder<InferTrainedModelRequest>> fn) -
docs
Required - 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 -
inferenceConfig
The inference configuration updates to apply on the API callAPI name:
inference_config -
modelId
public final java.lang.String modelId()Required - The unique identifier of the trained model.API name:
model_id -
timeout
Controls the amount of time to wait for inference results.API name:
timeout -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupInferTrainedModelRequestDeserializer
protected static void setupInferTrainedModelRequestDeserializer(ObjectDeserializer<InferTrainedModelRequest.Builder> op)
-