Class PutRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.inference.PutRequest
- All Implemented Interfaces:
JsonpSerializable
Create an inference endpoint. When you create an inference endpoint, the
associated machine learning model is automatically deployed if it is not
already running. After creating the endpoint, wait for the model deployment
to complete before using it. To verify the deployment status, use the get
trained model statistics API. Look for
"state": "fully_allocated"
in the response
and ensure that the "allocation_count"
matches the
"target_allocation_count"
. Avoid creating multiple
endpoints for the same model unless required, as each endpoint consumes
significant resources.
IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<PutRequest>
static final Endpoint<PutRequest,
PutResponse, ErrorResponse> Endpoint "inference.put
". -
Method Summary
Modifier and TypeMethodDescriptionprotected static JsonpDeserializer<PutRequest>
final InferenceEndpoint
Required - Request body.final String
Required - The inference Idstatic PutRequest
void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this value to JSON.final TaskType
taskType()
The task typeMethods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
-
_ENDPOINT
Endpoint "inference.put
".
-
-
Method Details
-
of
-
inferenceId
Required - The inference IdAPI name:
inference_id
-
taskType
The task typeAPI name:
task_type
-
inferenceConfig
Required - Request body. -
serialize
Serialize this value to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
createPutRequestDeserializer
-