Inference
- class elasticsearch.client.InferenceClient(client)
- Parameters:
client (BaseClient) –
- delete_model(*, inference_id, task_type=None, error_trace=None, filter_path=None, human=None, pretty=None)
Delete model in the Inference API
https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-inference-api.html
- get_model(*, inference_id, task_type=None, error_trace=None, filter_path=None, human=None, pretty=None)
Get a model in the Inference API
https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-inference-api.html
- inference(*, inference_id, input=None, task_type=None, error_trace=None, filter_path=None, human=None, pretty=None, task_settings=None, body=None)
Perform inference on a model
https://www.elastic.co/guide/en/elasticsearch/reference/8.13/post-inference-api.html
- Parameters:
inference_id (str) – The inference Id
input (str | Sequence[str] | None) – Text input to the model. Either a string or an array of strings.
task_type (Literal['sparse_embedding', 'text_embedding'] | str | None) – The task type
task_settings (Any | None) – Optional task settings
error_trace (bool | None) –
human (bool | None) –
pretty (bool | None) –
- Return type:
ObjectApiResponse[Any]
- put_model(*, inference_id, task_type=None, error_trace=None, filter_path=None, human=None, model_config=None, body=None, pretty=None)
Configure a model for use in the Inference API
https://www.elastic.co/guide/en/elasticsearch/reference/8.13/put-inference-api.html