mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 15:47:23 -04:00
Makes the task_type element of the _inference API optional so that it is possible to GET, DELETE or POST to an inference entity without providing the task type
65 lines
1.5 KiB
Text
65 lines
1.5 KiB
Text
[role="xpack"]
|
|
[[delete-inference-api]]
|
|
=== Delete {infer} API
|
|
|
|
experimental[]
|
|
|
|
Deletes an {infer} model deployment.
|
|
|
|
IMPORTANT: The {infer} APIs enable you to use certain services, such as ELSER,
|
|
OpenAI, or Hugging Face, in your cluster. This is not the same feature that you
|
|
can use on an ML node with custom {ml} models. If you want to train and use your
|
|
own model, use the <<ml-df-trained-models-apis>>.
|
|
|
|
|
|
[discrete]
|
|
[[delete-inference-api-request]]
|
|
==== {api-request-title}
|
|
|
|
`DELETE /_inference/<model_id>`
|
|
`DELETE /_inference/<task_type>/<model_id>`
|
|
|
|
[discrete]
|
|
[[delete-inference-api-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
* Requires the `manage` <<privileges-list-cluster,cluster privilege>>.
|
|
|
|
|
|
[discrete]
|
|
[[delete-inference-api-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
<model_id>::
|
|
(Required, string)
|
|
The unique identifier of the {infer} model to delete.
|
|
|
|
<task_type>::
|
|
(Optional, string)
|
|
The type of {infer} task that the model performs.
|
|
|
|
|
|
[discrete]
|
|
[[delete-inference-api-example]]
|
|
==== {api-examples-title}
|
|
|
|
The following API call deletes the `my-elser-model` {infer} model that can
|
|
perform `sparse_embedding` tasks.
|
|
|
|
|
|
[source,console]
|
|
------------------------------------------------------------
|
|
DELETE /_inference/sparse_embedding/my-elser-model
|
|
------------------------------------------------------------
|
|
// TEST[skip:TBD]
|
|
|
|
|
|
The API returns the following response:
|
|
|
|
[source,console-result]
|
|
------------------------------------------------------------
|
|
{
|
|
"acknowledged": true
|
|
}
|
|
------------------------------------------------------------
|
|
// NOTCONSOLE
|