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 class
InferTrainedModelRequest.Builder
Builder 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>
_DESERIALIZER
Json deserializer forInferTrainedModelRequest
static Endpoint<InferTrainedModelRequest,InferTrainedModelResponse,ErrorResponse>
_ENDPOINT
Endpoint "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.InferenceConfigUpdate
inferenceConfig()
The inference configuration updates to apply on the API calljava.lang.String
modelId()
Required - The unique identifier of the trained model.static InferTrainedModelRequest
of(java.util.function.Function<InferTrainedModelRequest.Builder,ObjectBuilder<InferTrainedModelRequest>> fn)
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
setupInferTrainedModelRequestDeserializer(ObjectDeserializer<InferTrainedModelRequest.Builder> op)
Time
timeout()
Controls the amount of time to wait for inference results.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
Methods 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:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupInferTrainedModelRequestDeserializer
protected static void setupInferTrainedModelRequestDeserializer(ObjectDeserializer<InferTrainedModelRequest.Builder> op)
-