mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
69 lines
1.8 KiB
Text
69 lines
1.8 KiB
Text
[role="xpack"]
|
|
[[delete-inference-api]]
|
|
=== Delete {infer} API
|
|
|
|
experimental[]
|
|
|
|
Deletes an {infer} endpoint.
|
|
|
|
IMPORTANT: The {infer} APIs enable you to use certain services, such as built-in
|
|
{ml} models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, or
|
|
Hugging Face. For built-in models and models uploaded though Eland, the {infer}
|
|
APIs offer an alternative way to use and manage trained models. However, if you
|
|
do not plan to use the {infer} APIs to use these models or if you want to use
|
|
non-NLP models, use the <<ml-df-trained-models-apis>>.
|
|
|
|
|
|
[discrete]
|
|
[[delete-inference-api-request]]
|
|
==== {api-request-title}
|
|
|
|
`DELETE /_inference/<inference_id>`
|
|
|
|
`DELETE /_inference/<task_type>/<inference_id>`
|
|
|
|
[discrete]
|
|
[[delete-inference-api-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
* Requires the `manage_inference` <<privileges-list-cluster,cluster privilege>>
|
|
(the built-in `inference_admin` role grants this privilege)
|
|
|
|
|
|
[discrete]
|
|
[[delete-inference-api-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
<inference_id>::
|
|
(Required, string)
|
|
The unique identifier of the {infer} endpoint 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
|