From dc6d5c9c678c8fed2aa0c97a0253edd7f85bc4f8 Mon Sep 17 00:00:00 2001 From: pquentin <42327+pquentin@users.noreply.github.com> Date: Thu, 7 Aug 2025 04:22:50 +0000 Subject: [PATCH] Update rest-api-spec --- output/openapi/elasticsearch-openapi.json | 370 +++++++++++++++++- .../elasticsearch-serverless-openapi.json | 366 ++++++++++++++++- output/schema/schema.json | 287 ++++++++++---- output/typescript/types.ts | 8 +- 4 files changed, 918 insertions(+), 113 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index e81215c773..390ed7266a 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -20358,7 +20358,7 @@ "inference" ], "summary": "Create an inference endpoint", - "description": "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.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, 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.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "description": "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.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, 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.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`chat_completion`, `completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* JinaAI (`rerank`, `text_embedding`)\n* Llama (`chat_completion`, `completion`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`rerank`, `text_embedding`)\n* Watsonx inference integration (`text_embedding`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", "operationId": "inference-put", "parameters": [ { @@ -20479,7 +20479,7 @@ "inference" ], "summary": "Create an inference endpoint", - "description": "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.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, 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.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "description": "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.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, 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.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`chat_completion`, `completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* JinaAI (`rerank`, `text_embedding`)\n* Llama (`chat_completion`, `completion`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`rerank`, `text_embedding`)\n* Watsonx inference integration (`text_embedding`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", "operationId": "inference-put-1", "parameters": [ { @@ -20811,6 +20811,123 @@ ] } }, + "/_inference/{task_type}/{amazonsagemaker_inference_id}": { + "put": { + "tags": [ + "inference" + ], + "summary": "Create an Amazon SageMaker inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `amazon_sagemaker` service.\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "operationId": "inference-put-amazonsagemaker", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.TaskTypeAmazonSageMaker" + }, + "style": "simple" + }, + { + "in": "path", + "name": "amazonsagemaker_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + }, + "service": { + "$ref": "#/components/schemas/inference._types.AmazonSageMakerServiceType" + }, + "service_settings": { + "$ref": "#/components/schemas/inference._types.AmazonSageMakerServiceSettings" + }, + "task_settings": { + "$ref": "#/components/schemas/inference._types.AmazonSageMakerTaskSettings" + } + }, + "required": [ + "service", + "service_settings" + ] + }, + "examples": { + "PutAmazonSageMakerRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/amazon_sagemaker_embeddings` to create an inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\",\n \"dimensions\": 384,\n \"element_type\": \"float\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample2": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/amazon_sagemaker_completion` to create an inference endpoint that performs a completion task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample3": { + "summary": "A chat completion task", + "description": "Run `PUT _inference/chat_completion/amazon_sagemaker_chat_completion` to create an inference endpoint that performs a chat completion task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample4": { + "summary": "A sparse embedding task", + "description": "Run `PUT _inference/sparse_embedding/amazon_sagemaker_sparse_embedding` to create an inference endpoint that performs a sparse embedding task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample5": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/amazon_sagemaker_rerank` to create an inference endpoint that performs a rerank task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAmazonSageMaker" + } + } + } + } + }, + "x-state": "Generally available; Added in 9.1.0", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, "/_inference/{task_type}/{anthropic_inference_id}": { "put": { "tags": [ @@ -21273,6 +21390,33 @@ "service", "service_settings" ] + }, + "examples": { + "PutCustomRequestExample1": { + "summary": "Custom text embedding task (OpenAI)", + "description": "Run `PUT _inference/text_embedding/custom-embeddings` to create an inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.openai.com/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json;charset=utf-8\"\n },\n \"request\": \"{\\\"input\\\": ${input}, \\\"model\\\": \\\"text-embedding-3-small\\\"}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\": \"$.data[*].embedding[*]\"\n }\n }\n }\n}" + }, + "PutCustomRequestExample2": { + "summary": "Custom rerank task (Cohere APIv2)", + "description": "Run `PUT _inference/rerank/custom-rerank` to create an inference endpoint that performs a rerank task.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.cohere.com/v2/rerank\",\n \"headers\": {\n \"Authorization\": \"bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"documents\\\": ${input}, \\\"query\\\": ${query}, \\\"model\\\": \\\"rerank-v3.5\\\"}\",\n \"response\": {\n \"json_parser\": {\n \"reranked_index\":\"$.results[*].index\",\n \"relevance_score\":\"$.results[*].relevance_score\"\n }\n }\n }\n}" + }, + "PutCustomRequestExample3": { + "summary": "Custom text embedding task (Cohere APIv2)", + "description": "Run `PUT _inference/text_embedding/custom-text-embedding` to create an inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.cohere.com/v2/embed\",\n \"headers\": {\n \"Authorization\": \"bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"texts\\\": ${input}, \\\"model\\\": \\\"embed-v4.0\\\", \\\"input_type\\\": ${input_type}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.embeddings.float[*]\"\n }\n },\n \"input_type\": {\n \"translation\": {\n \"ingest\": \"search_document\",\n \"search\": \"search_query\"\n },\n \"default\": \"search_document\"\n }\n }\n}" + }, + "PutCustomRequestExample4": { + "summary": "Custom rerank task (Jina AI)", + "description": "Run `PUT _inference/rerank/custom-rerank-jina` to create an inference endpoint that performs a rerank task.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n }, \n \"url\": \"https://api.jina.ai/v1/rerank\",\n \"headers\": {\n \"Content-Type\": \"application/json\",\n \"Authorization\": \"Bearer ${api_key}\"\n },\n \"request\": \"{\\\"model\\\": \\\"jina-reranker-v2-base-multilingual\\\",\\\"query\\\": ${query},\\\"documents\\\":${input}}\",\n \"response\": {\n \"json_parser\": {\n \"relevance_score\": \"$.results[*].relevance_score\",\n \"reranked_index\": \"$.results[*].index\"\n }\n }\n }\n}" + }, + "PutCustomRequestExample5": { + "summary": "Custom text embedding task (Hugging Face)", + "description": "Run `PUT _inference/text_embedding/custom-text-embedding-hf` to create an inference endpoint that performs a text embedding task by using the Qwen/Qwen3-Embedding-8B model.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"input\\\": ${input}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n }\n }\n}" + } } } } @@ -77227,10 +77371,24 @@ "type": "object", "properties": { "strategy": { - "description": "The chunking strategy: `sentence` or `word`.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#chunking-strategies" + }, + "description": "The chunking strategy: `sentence`, `word`, `none` or `recursive`.\n\n * If `strategy` is set to `recursive`, you must also specify:\n\n- `max_chunk_size`\n- either `separators` or`separator_group`\n\nLearn more about different chunking strategies in the linked documentation.", "default": "sentence", "type": "string" }, + "separator_group": { + "description": "This parameter is only applicable when using the `recursive` chunking strategy.\n\nSets a predefined list of separators in the saved chunking settings based on the selected text type.\nValues can be `markdown` or `plaintext`.\n\nUsing this parameter is an alternative to manually specifying a custom `separators` list.", + "type": "string" + }, + "separators": { + "description": "A list of strings used as possible split points when chunking text with the `recursive` strategy.\n\nEach string can be a plain string or a regular expression (regex) pattern.\nThe system tries each separator in order to split the text, starting from the first item in the list.\n\nAfter splitting, it attempts to recombine smaller pieces into larger chunks that stay within\nthe `max_chunk_size` limit, to reduce the total number of chunks generated.", + "type": "array", + "items": { + "type": "string" + } + }, "max_chunk_size": { "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", "default": 250.0, @@ -77249,6 +77407,8 @@ }, "required": [ "strategy", + "separator_group", + "separators", "max_chunk_size" ] }, @@ -88198,12 +88358,30 @@ "default": 1.0, "type": "number" }, + "separator_group": { + "description": "This parameter is only applicable when using the `recursive` chunking strategy.\n\nSets a predefined list of separators in the saved chunking settings based on the selected text type.\nValues can be `markdown` or `plaintext`.\n\nUsing this parameter is an alternative to manually specifying a custom `separators` list.", + "type": "string" + }, + "separators": { + "description": "A list of strings used as possible split points when chunking text with the `recursive` strategy.\n\nEach string can be a plain string or a regular expression (regex) pattern.\nThe system tries each separator in order to split the text, starting from the first item in the list.\n\nAfter splitting, it attempts to recombine smaller pieces into larger chunks that stay within\nthe `max_chunk_size` limit, to reduce the total number of chunks generated.", + "type": "array", + "items": { + "type": "string" + } + }, "strategy": { - "description": "The chunking strategy: `sentence` or `word`.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#chunking-strategies" + }, + "description": "The chunking strategy: `sentence`, `word`, `none` or `recursive`.\n\n * If `strategy` is set to `recursive`, you must also specify:\n\n- `max_chunk_size`\n- either `separators` or`separator_group`\n\nLearn more about different chunking strategies in the linked documentation.", "default": "sentence", "type": "string" } - } + }, + "required": [ + "separator_group", + "separators" + ] }, "inference._types.ServiceSettings": { "type": "object" @@ -88538,6 +88716,162 @@ "completion" ] }, + "inference._types.TaskTypeAmazonSageMaker": { + "type": "string", + "enum": [ + "text_embedding", + "completion", + "chat_completion", + "sparse_embedding", + "rerank" + ] + }, + "inference._types.AmazonSageMakerServiceType": { + "type": "string", + "enum": [ + "amazon_sagemaker" + ] + }, + "inference._types.AmazonSageMakerServiceSettings": { + "type": "object", + "properties": { + "access_key": { + "description": "A valid AWS access key that has permissions to use Amazon SageMaker and access to models for invoking requests.", + "type": "string" + }, + "endpoint_name": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The name of the SageMaker endpoint.", + "type": "string" + }, + "api": { + "$ref": "#/components/schemas/inference._types.AmazonSageMakerApi" + }, + "region": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The region that your endpoint or Amazon Resource Name (ARN) is deployed in.\nThe list of available regions per model can be found in the Amazon SageMaker documentation.", + "type": "string" + }, + "secret_key": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html" + }, + "description": "A valid AWS secret key that is paired with the `access_key`.\nFor information about creating and managing access and secret keys, refer to the AWS documentation.", + "type": "string" + }, + "target_model": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The model ID when calling a multi-model endpoint.", + "type": "string" + }, + "target_container_hostname": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The container to directly invoke when calling a multi-container endpoint.", + "type": "string" + }, + "inference_component_name": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The inference component to directly invoke when calling a multi-component endpoint.", + "type": "string" + }, + "batch_size": { + "description": "The maximum number of inputs in each batch. This value is used by inference ingestion pipelines\nwhen processing semantic values. It correlates to the number of times the SageMaker endpoint is\ninvoked (one per batch of input).", + "default": 256.0, + "type": "number" + }, + "dimensions": { + "description": "The number of dimensions returned by the text embedding models. If this value is not provided, then\nit is guessed by making invoking the endpoint for the `text_embedding` task.", + "type": "number" + } + }, + "required": [ + "access_key", + "endpoint_name", + "api", + "region", + "secret_key" + ] + }, + "inference._types.AmazonSageMakerApi": { + "type": "string", + "enum": [ + "openai", + "elastic" + ] + }, + "inference._types.AmazonSageMakerTaskSettings": { + "type": "object", + "properties": { + "custom_attributes": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The AWS custom attributes passed verbatim through to the model running in the SageMaker Endpoint.\nValues will be returned in the `X-elastic-sagemaker-custom-attributes` header.", + "type": "string" + }, + "enable_explanations": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The optional JMESPath expression used to override the EnableExplanations provided during endpoint creation.", + "type": "string" + }, + "inference_id": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The capture data ID when enabled in the endpoint.", + "type": "string" + }, + "session_id": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The stateful session identifier for a new or existing session.\nNew sessions will be returned in the `X-elastic-sagemaker-new-session-id` header.\nClosed sessions will be returned in the `X-elastic-sagemaker-closed-session-id` header.", + "type": "string" + }, + "target_variant": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "Specifies the variant when running with multi-variant Endpoints.", + "type": "string" + } + } + }, + "inference._types.InferenceEndpointInfoAmazonSageMaker": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "$ref": "#/components/schemas/inference._types.TaskTypeAmazonSageMaker" + } + }, + "required": [ + "inference_id", + "task_type" + ] + } + ] + }, "inference._types.AnthropicTaskType": { "type": "string", "enum": [ @@ -88856,7 +89190,7 @@ "$ref": "#/components/schemas/inference._types.CohereEmbeddingType" }, "model_id": { - "description": "For a `completion`, `rerank`, or `text_embedding` task, the name of the model to use for the inference task.\n\n* For the available `completion` models, refer to the [Cohere command docs](https://docs.cohere.com/docs/models#command).\n* For the available `rerank` models, refer to the [Cohere rerank docs](https://docs.cohere.com/reference/rerank-1).\n* For the available `text_embedding` models, refer to [Cohere embed docs](https://docs.cohere.com/reference/embed).\n\nThe default value for a text embedding task is `embed-english-v2.0`.", + "description": "For a `completion`, `rerank`, or `text_embedding` task, the name of the model to use for the inference task.\n\n* For the available `completion` models, refer to the [Cohere command docs](https://docs.cohere.com/docs/models#command).\n* For the available `rerank` models, refer to the [Cohere rerank docs](https://docs.cohere.com/reference/rerank-1).\n* For the available `text_embedding` models, refer to [Cohere embed docs](https://docs.cohere.com/reference/embed).", "type": "string" }, "rate_limit": { @@ -88867,7 +89201,8 @@ } }, "required": [ - "api_key" + "api_key", + "model_id" ] }, "inference._types.CohereEmbeddingType": { @@ -88905,7 +89240,10 @@ "truncate": { "$ref": "#/components/schemas/inference._types.CohereTruncateType" } - } + }, + "required": [ + "input_type" + ] }, "inference._types.CohereInputType": { "type": "string", @@ -126347,7 +126685,7 @@ "examples": { "InferencePutExample1": { "description": "An example body for a `PUT _inference/rerank/my-rerank-model` request.", - "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n}" + "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n \"chunking_settings\": {\n \"strategy\": \"recursive\",\n \"max_chunk_size\": 200,\n \"separator_group\": \"markdown\"\n}" } } } @@ -128133,12 +128471,12 @@ "SimulateIngestRequestExample1": { "summary": "Existing pipeline definitions", "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. Since both documents are being ingested into `my-index`, both pipelines are run using the pipeline definitions that are already in the system.", - "value": "{\n \"docs\": [\n {\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + "value": "{\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" }, "SimulateIngestRequestExample2": { "summary": "Pipeline substitions", "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. But a substitute definition of `my-pipeline` is provided in `pipeline_substitutions`. The substitute `my-pipeline` will be used in place of the `my-pipeline` that is in the system, and then the `my-final-pipeline` that is already defined in the system will run.", - "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": 123,\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": 456,\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"uppercase\": {\n \"field\": \"foo\"\n }\n }\n ]\n }\n }\n}" + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"uppercase\": {\n \"field\": \"foo\"\n }\n }\n ]\n }\n }\n}" }, "SimulateIngestRequestExample3": { "summary": "Component template substitutions", @@ -128306,8 +128644,8 @@ }, "params": { "description": "The values for parameters in the query.", - "type": "object", - "additionalProperties": { + "type": "array", + "items": { "type": "object" } }, @@ -128447,7 +128785,11 @@ } }, "fields": { - "$ref": "#/components/schemas/_types.Fields" + "description": "A list of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } }, "field_statistics": { "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 2e7af79da1..1f889fbcd3 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -11177,7 +11177,7 @@ "inference" ], "summary": "Create an inference endpoint", - "description": "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.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, 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.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "description": "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.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, 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.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`chat_completion`, `completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* JinaAI (`rerank`, `text_embedding`)\n* Llama (`chat_completion`, `completion`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`rerank`, `text_embedding`)\n* Watsonx inference integration (`text_embedding`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", "operationId": "inference-put", "parameters": [ { @@ -11298,7 +11298,7 @@ "inference" ], "summary": "Create an inference endpoint", - "description": "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.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, 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.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "description": "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.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, 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.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`chat_completion`, `completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* JinaAI (`rerank`, `text_embedding`)\n* Llama (`chat_completion`, `completion`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`rerank`, `text_embedding`)\n* Watsonx inference integration (`text_embedding`)\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", "operationId": "inference-put-1", "parameters": [ { @@ -11630,6 +11630,123 @@ ] } }, + "/_inference/{task_type}/{amazonsagemaker_inference_id}": { + "put": { + "tags": [ + "inference" + ], + "summary": "Create an Amazon SageMaker inference endpoint", + "description": "Create an inference endpoint to perform an inference task with the `amazon_sagemaker` service.\n\n## Required authorization\n\n* Cluster privileges: `manage_inference`\n", + "operationId": "inference-put-amazonsagemaker", + "parameters": [ + { + "in": "path", + "name": "task_type", + "description": "The type of the inference task that the model will perform.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types.TaskTypeAmazonSageMaker" + }, + "style": "simple" + }, + { + "in": "path", + "name": "amazonsagemaker_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "timeout", + "description": "Specifies the amount of time to wait for the inference endpoint to be created.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "chunking_settings": { + "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" + }, + "service": { + "$ref": "#/components/schemas/inference._types.AmazonSageMakerServiceType" + }, + "service_settings": { + "$ref": "#/components/schemas/inference._types.AmazonSageMakerServiceSettings" + }, + "task_settings": { + "$ref": "#/components/schemas/inference._types.AmazonSageMakerTaskSettings" + } + }, + "required": [ + "service", + "service_settings" + ] + }, + "examples": { + "PutAmazonSageMakerRequestExample1": { + "summary": "A text embedding task", + "description": "Run `PUT _inference/text_embedding/amazon_sagemaker_embeddings` to create an inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\",\n \"dimensions\": 384,\n \"element_type\": \"float\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample2": { + "summary": "A completion task", + "description": "Run `PUT _inference/completion/amazon_sagemaker_completion` to create an inference endpoint that performs a completion task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample3": { + "summary": "A chat completion task", + "description": "Run `PUT _inference/chat_completion/amazon_sagemaker_chat_completion` to create an inference endpoint that performs a chat completion task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample4": { + "summary": "A sparse embedding task", + "description": "Run `PUT _inference/sparse_embedding/amazon_sagemaker_sparse_embedding` to create an inference endpoint that performs a sparse embedding task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample5": { + "summary": "A rerank task", + "description": "Run `PUT _inference/rerank/amazon_sagemaker_rerank` to create an inference endpoint that performs a rerank task.", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAmazonSageMaker" + } + } + } + } + }, + "x-state": "Generally available", + "x-metaTags": [ + { + "content": "Elasticsearch, Machine Learning", + "name": "product_name" + } + ] + } + }, "/_inference/{task_type}/{anthropic_inference_id}": { "put": { "tags": [ @@ -12092,6 +12209,33 @@ "service", "service_settings" ] + }, + "examples": { + "PutCustomRequestExample1": { + "summary": "Custom text embedding task (OpenAI)", + "description": "Run `PUT _inference/text_embedding/custom-embeddings` to create an inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.openai.com/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json;charset=utf-8\"\n },\n \"request\": \"{\\\"input\\\": ${input}, \\\"model\\\": \\\"text-embedding-3-small\\\"}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\": \"$.data[*].embedding[*]\"\n }\n }\n }\n}" + }, + "PutCustomRequestExample2": { + "summary": "Custom rerank task (Cohere APIv2)", + "description": "Run `PUT _inference/rerank/custom-rerank` to create an inference endpoint that performs a rerank task.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.cohere.com/v2/rerank\",\n \"headers\": {\n \"Authorization\": \"bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"documents\\\": ${input}, \\\"query\\\": ${query}, \\\"model\\\": \\\"rerank-v3.5\\\"}\",\n \"response\": {\n \"json_parser\": {\n \"reranked_index\":\"$.results[*].index\",\n \"relevance_score\":\"$.results[*].relevance_score\"\n }\n }\n }\n}" + }, + "PutCustomRequestExample3": { + "summary": "Custom text embedding task (Cohere APIv2)", + "description": "Run `PUT _inference/text_embedding/custom-text-embedding` to create an inference endpoint that performs a text embedding task.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.cohere.com/v2/embed\",\n \"headers\": {\n \"Authorization\": \"bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"texts\\\": ${input}, \\\"model\\\": \\\"embed-v4.0\\\", \\\"input_type\\\": ${input_type}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.embeddings.float[*]\"\n }\n },\n \"input_type\": {\n \"translation\": {\n \"ingest\": \"search_document\",\n \"search\": \"search_query\"\n },\n \"default\": \"search_document\"\n }\n }\n}" + }, + "PutCustomRequestExample4": { + "summary": "Custom rerank task (Jina AI)", + "description": "Run `PUT _inference/rerank/custom-rerank-jina` to create an inference endpoint that performs a rerank task.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n }, \n \"url\": \"https://api.jina.ai/v1/rerank\",\n \"headers\": {\n \"Content-Type\": \"application/json\",\n \"Authorization\": \"Bearer ${api_key}\"\n },\n \"request\": \"{\\\"model\\\": \\\"jina-reranker-v2-base-multilingual\\\",\\\"query\\\": ${query},\\\"documents\\\":${input}}\",\n \"response\": {\n \"json_parser\": {\n \"relevance_score\": \"$.results[*].relevance_score\",\n \"reranked_index\": \"$.results[*].index\"\n }\n }\n }\n}" + }, + "PutCustomRequestExample5": { + "summary": "Custom text embedding task (Hugging Face)", + "description": "Run `PUT _inference/text_embedding/custom-text-embedding-hf` to create an inference endpoint that performs a text embedding task by using the Qwen/Qwen3-Embedding-8B model.", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"input\\\": ${input}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n }\n }\n}" + } } } } @@ -50606,10 +50750,24 @@ "type": "object", "properties": { "strategy": { - "description": "The chunking strategy: `sentence` or `word`.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#chunking-strategies" + }, + "description": "The chunking strategy: `sentence`, `word`, `none` or `recursive`.\n\n * If `strategy` is set to `recursive`, you must also specify:\n\n- `max_chunk_size`\n- either `separators` or`separator_group`\n\nLearn more about different chunking strategies in the linked documentation.", "default": "sentence", "type": "string" }, + "separator_group": { + "description": "This parameter is only applicable when using the `recursive` chunking strategy.\n\nSets a predefined list of separators in the saved chunking settings based on the selected text type.\nValues can be `markdown` or `plaintext`.\n\nUsing this parameter is an alternative to manually specifying a custom `separators` list.", + "type": "string" + }, + "separators": { + "description": "A list of strings used as possible split points when chunking text with the `recursive` strategy.\n\nEach string can be a plain string or a regular expression (regex) pattern.\nThe system tries each separator in order to split the text, starting from the first item in the list.\n\nAfter splitting, it attempts to recombine smaller pieces into larger chunks that stay within\nthe `max_chunk_size` limit, to reduce the total number of chunks generated.", + "type": "array", + "items": { + "type": "string" + } + }, "max_chunk_size": { "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", "default": 250.0, @@ -50628,6 +50786,8 @@ }, "required": [ "strategy", + "separator_group", + "separators", "max_chunk_size" ] }, @@ -55542,12 +55702,30 @@ "default": 1.0, "type": "number" }, + "separator_group": { + "description": "This parameter is only applicable when using the `recursive` chunking strategy.\n\nSets a predefined list of separators in the saved chunking settings based on the selected text type.\nValues can be `markdown` or `plaintext`.\n\nUsing this parameter is an alternative to manually specifying a custom `separators` list.", + "type": "string" + }, + "separators": { + "description": "A list of strings used as possible split points when chunking text with the `recursive` strategy.\n\nEach string can be a plain string or a regular expression (regex) pattern.\nThe system tries each separator in order to split the text, starting from the first item in the list.\n\nAfter splitting, it attempts to recombine smaller pieces into larger chunks that stay within\nthe `max_chunk_size` limit, to reduce the total number of chunks generated.", + "type": "array", + "items": { + "type": "string" + } + }, "strategy": { - "description": "The chunking strategy: `sentence` or `word`.", + "externalDocs": { + "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#chunking-strategies" + }, + "description": "The chunking strategy: `sentence`, `word`, `none` or `recursive`.\n\n * If `strategy` is set to `recursive`, you must also specify:\n\n- `max_chunk_size`\n- either `separators` or`separator_group`\n\nLearn more about different chunking strategies in the linked documentation.", "default": "sentence", "type": "string" } - } + }, + "required": [ + "separator_group", + "separators" + ] }, "inference._types.ServiceSettings": { "type": "object" @@ -55882,6 +56060,162 @@ "completion" ] }, + "inference._types.TaskTypeAmazonSageMaker": { + "type": "string", + "enum": [ + "text_embedding", + "completion", + "chat_completion", + "sparse_embedding", + "rerank" + ] + }, + "inference._types.AmazonSageMakerServiceType": { + "type": "string", + "enum": [ + "amazon_sagemaker" + ] + }, + "inference._types.AmazonSageMakerServiceSettings": { + "type": "object", + "properties": { + "access_key": { + "description": "A valid AWS access key that has permissions to use Amazon SageMaker and access to models for invoking requests.", + "type": "string" + }, + "endpoint_name": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The name of the SageMaker endpoint.", + "type": "string" + }, + "api": { + "$ref": "#/components/schemas/inference._types.AmazonSageMakerApi" + }, + "region": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The region that your endpoint or Amazon Resource Name (ARN) is deployed in.\nThe list of available regions per model can be found in the Amazon SageMaker documentation.", + "type": "string" + }, + "secret_key": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html" + }, + "description": "A valid AWS secret key that is paired with the `access_key`.\nFor information about creating and managing access and secret keys, refer to the AWS documentation.", + "type": "string" + }, + "target_model": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The model ID when calling a multi-model endpoint.", + "type": "string" + }, + "target_container_hostname": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The container to directly invoke when calling a multi-container endpoint.", + "type": "string" + }, + "inference_component_name": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The inference component to directly invoke when calling a multi-component endpoint.", + "type": "string" + }, + "batch_size": { + "description": "The maximum number of inputs in each batch. This value is used by inference ingestion pipelines\nwhen processing semantic values. It correlates to the number of times the SageMaker endpoint is\ninvoked (one per batch of input).", + "default": 256.0, + "type": "number" + }, + "dimensions": { + "description": "The number of dimensions returned by the text embedding models. If this value is not provided, then\nit is guessed by making invoking the endpoint for the `text_embedding` task.", + "type": "number" + } + }, + "required": [ + "access_key", + "endpoint_name", + "api", + "region", + "secret_key" + ] + }, + "inference._types.AmazonSageMakerApi": { + "type": "string", + "enum": [ + "openai", + "elastic" + ] + }, + "inference._types.AmazonSageMakerTaskSettings": { + "type": "object", + "properties": { + "custom_attributes": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The AWS custom attributes passed verbatim through to the model running in the SageMaker Endpoint.\nValues will be returned in the `X-elastic-sagemaker-custom-attributes` header.", + "type": "string" + }, + "enable_explanations": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The optional JMESPath expression used to override the EnableExplanations provided during endpoint creation.", + "type": "string" + }, + "inference_id": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The capture data ID when enabled in the endpoint.", + "type": "string" + }, + "session_id": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "The stateful session identifier for a new or existing session.\nNew sessions will be returned in the `X-elastic-sagemaker-new-session-id` header.\nClosed sessions will be returned in the `X-elastic-sagemaker-closed-session-id` header.", + "type": "string" + }, + "target_variant": { + "externalDocs": { + "url": "https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html" + }, + "description": "Specifies the variant when running with multi-variant Endpoints.", + "type": "string" + } + } + }, + "inference._types.InferenceEndpointInfoAmazonSageMaker": { + "allOf": [ + { + "$ref": "#/components/schemas/inference._types.InferenceEndpoint" + }, + { + "type": "object", + "properties": { + "inference_id": { + "description": "The inference Id", + "type": "string" + }, + "task_type": { + "$ref": "#/components/schemas/inference._types.TaskTypeAmazonSageMaker" + } + }, + "required": [ + "inference_id", + "task_type" + ] + } + ] + }, "inference._types.AnthropicTaskType": { "type": "string", "enum": [ @@ -56200,7 +56534,7 @@ "$ref": "#/components/schemas/inference._types.CohereEmbeddingType" }, "model_id": { - "description": "For a `completion`, `rerank`, or `text_embedding` task, the name of the model to use for the inference task.\n\n* For the available `completion` models, refer to the [Cohere command docs](https://docs.cohere.com/docs/models#command).\n* For the available `rerank` models, refer to the [Cohere rerank docs](https://docs.cohere.com/reference/rerank-1).\n* For the available `text_embedding` models, refer to [Cohere embed docs](https://docs.cohere.com/reference/embed).\n\nThe default value for a text embedding task is `embed-english-v2.0`.", + "description": "For a `completion`, `rerank`, or `text_embedding` task, the name of the model to use for the inference task.\n\n* For the available `completion` models, refer to the [Cohere command docs](https://docs.cohere.com/docs/models#command).\n* For the available `rerank` models, refer to the [Cohere rerank docs](https://docs.cohere.com/reference/rerank-1).\n* For the available `text_embedding` models, refer to [Cohere embed docs](https://docs.cohere.com/reference/embed).", "type": "string" }, "rate_limit": { @@ -56211,7 +56545,8 @@ } }, "required": [ - "api_key" + "api_key", + "model_id" ] }, "inference._types.CohereEmbeddingType": { @@ -56249,7 +56584,10 @@ "truncate": { "$ref": "#/components/schemas/inference._types.CohereTruncateType" } - } + }, + "required": [ + "input_type" + ] }, "inference._types.CohereInputType": { "type": "string", @@ -75554,7 +75892,7 @@ "examples": { "InferencePutExample1": { "description": "An example body for a `PUT _inference/rerank/my-rerank-model` request.", - "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n}" + "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n \"chunking_settings\": {\n \"strategy\": \"recursive\",\n \"max_chunk_size\": 200,\n \"separator_group\": \"markdown\"\n}" } } } @@ -76633,8 +76971,8 @@ }, "params": { "description": "The values for parameters in the query.", - "type": "object", - "additionalProperties": { + "type": "array", + "items": { "type": "object" } }, @@ -76774,7 +77112,11 @@ } }, "fields": { - "$ref": "#/components/schemas/_types.Fields" + "description": "A list of fields to include in the statistics.\nIt is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.Field" + } }, "field_statistics": { "description": "If `true`, the response includes:\n\n* The document count (how many documents contain this field).\n* The sum of document frequencies (the sum of document frequencies for all terms in this field).\n* The sum of total term frequencies (the sum of total term frequencies of each term in this field).", diff --git a/output/schema/schema.json b/output/schema/schema.json index eb1b95cf81..dbc9658fd2 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -9834,7 +9834,7 @@ "visibility": "public" } }, - "description": "Create an inference endpoint.\n\nIMPORTANT: 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.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, 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.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)", + "description": "Create an inference endpoint.\n\nIMPORTANT: 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.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, 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.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`chat_completion`, `completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* JinaAI (`rerank`, `text_embedding`)\n* Llama (`chat_completion`, `completion`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`rerank`, `text_embedding`)\n* Watsonx inference integration (`text_embedding`)", "docId": "inference-api-put", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put", "extPreviousVersionDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-inference-api.html", @@ -47284,10 +47284,13 @@ "name": "fields", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "Fields", - "namespace": "_types" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } } } }, @@ -82117,7 +82120,9 @@ }, "properties": [ { - "description": "The chunking strategy: `sentence` or `word`.", + "description": "The chunking strategy: `sentence`, `word`, `none` or `recursive`.\n\n * If `strategy` is set to `recursive`, you must also specify:\n\n- `max_chunk_size`\n- either `separators` or`separator_group`\n\nLearn more about different chunking strategies in the linked documentation.", + "extDocId": "chunking-strategies", + "extDocUrl": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#chunking-strategies", "name": "strategy", "required": true, "serverDefault": "sentence", @@ -82129,6 +82134,33 @@ } } }, + { + "description": "This parameter is only applicable when using the `recursive` chunking strategy.\n\nSets a predefined list of separators in the saved chunking settings based on the selected text type.\nValues can be `markdown` or `plaintext`.\n\nUsing this parameter is an alternative to manually specifying a custom `separators` list.", + "name": "separator_group", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "A list of strings used as possible split points when chunking text with the `recursive` strategy.\n\nEach string can be a plain string or a regular expression (regex) pattern.\nThe system tries each separator in order to split the text, starting from the first item in the list.\n\nAfter splitting, it attempts to recombine smaller pieces into larger chunks that stay within\nthe `max_chunk_size` limit, to reduce the total number of chunks generated.", + "name": "separators", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, { "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", "name": "max_chunk_size", @@ -82169,7 +82201,7 @@ } } ], - "specLocation": "_types/mapping/ChunkingSettings.ts#L24-L32" + "specLocation": "_types/mapping/ChunkingSettings.ts#L24-L36" }, { "kind": "interface", @@ -167923,7 +167955,7 @@ "name": "CohereEmbeddingType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L843-L849" + "specLocation": "inference/_types/CommonTypes.ts#L841-L847" }, { "kind": "enum", @@ -167945,7 +167977,7 @@ "name": "CohereInputType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L851-L856" + "specLocation": "inference/_types/CommonTypes.ts#L849-L854" }, { "kind": "interface", @@ -167982,9 +168014,9 @@ } }, { - "description": "For a `completion`, `rerank`, or `text_embedding` task, the name of the model to use for the inference task.\n\n* For the available `completion` models, refer to the [Cohere command docs](https://docs.cohere.com/docs/models#command).\n* For the available `rerank` models, refer to the [Cohere rerank docs](https://docs.cohere.com/reference/rerank-1).\n* For the available `text_embedding` models, refer to [Cohere embed docs](https://docs.cohere.com/reference/embed).\n\nThe default value for a text embedding task is `embed-english-v2.0`.", + "description": "For a `completion`, `rerank`, or `text_embedding` task, the name of the model to use for the inference task.\n\n* For the available `completion` models, refer to the [Cohere command docs](https://docs.cohere.com/docs/models#command).\n* For the available `rerank` models, refer to the [Cohere rerank docs](https://docs.cohere.com/reference/rerank-1).\n* For the available `text_embedding` models, refer to [Cohere embed docs](https://docs.cohere.com/reference/embed).", "name": "model_id", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -168018,7 +168050,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L788-L831" + "specLocation": "inference/_types/CommonTypes.ts#L788-L829" }, { "kind": "enum", @@ -168031,7 +168063,7 @@ "name": "CohereServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L839-L841" + "specLocation": "inference/_types/CommonTypes.ts#L837-L839" }, { "kind": "enum", @@ -168050,7 +168082,7 @@ "name": "CohereSimilarityType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L858-L862" + "specLocation": "inference/_types/CommonTypes.ts#L856-L860" }, { "kind": "interface", @@ -168062,7 +168094,7 @@ { "description": "For a `text_embedding` task, the type of input passed to the model.\nValid values are:\n\n* `classification`: Use it for embeddings passed through a text classifier.\n* `clustering`: Use it for the embeddings run through a clustering algorithm.\n* `ingest`: Use it for storing document embeddings in a vector database.\n* `search`: Use it for storing embeddings of search queries run against a vector database to find relevant documents.\n\nIMPORTANT: The `input_type` field is required when using embedding models `v3` and higher.", "name": "input_type", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -168108,7 +168140,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L870-L902" + "specLocation": "inference/_types/CommonTypes.ts#L868-L900" }, { "kind": "enum", @@ -168127,7 +168159,7 @@ "name": "CohereTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L833-L837" + "specLocation": "inference/_types/CommonTypes.ts#L831-L835" }, { "kind": "enum", @@ -168146,7 +168178,7 @@ "name": "CohereTruncateType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L864-L868" + "specLocation": "inference/_types/CommonTypes.ts#L862-L866" }, { "kind": "interface", @@ -168429,7 +168461,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L974-L985" + "specLocation": "inference/_types/CommonTypes.ts#L972-L983" }, { "kind": "interface", @@ -168447,7 +168479,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L987-L1125" + "specLocation": "inference/_types/CommonTypes.ts#L985-L1123" }, { "kind": "interface", @@ -168525,7 +168557,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L904-L972" + "specLocation": "inference/_types/CommonTypes.ts#L902-L970" }, { "kind": "enum", @@ -168538,7 +168570,7 @@ "name": "CustomServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1134-L1136" + "specLocation": "inference/_types/CommonTypes.ts#L1132-L1134" }, { "kind": "interface", @@ -168556,7 +168588,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1138-L1152" + "specLocation": "inference/_types/CommonTypes.ts#L1136-L1150" }, { "kind": "enum", @@ -168578,7 +168610,7 @@ "name": "CustomTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1127-L1132" + "specLocation": "inference/_types/CommonTypes.ts#L1125-L1130" }, { "kind": "interface", @@ -168626,7 +168658,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1166-L1188" + "specLocation": "inference/_types/CommonTypes.ts#L1164-L1186" }, { "kind": "enum", @@ -168639,7 +168671,7 @@ "name": "DeepSeekServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1190-L1192" + "specLocation": "inference/_types/CommonTypes.ts#L1188-L1190" }, { "kind": "interface", @@ -168780,7 +168812,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1215-L1249" + "specLocation": "inference/_types/CommonTypes.ts#L1213-L1247" }, { "kind": "enum", @@ -168793,7 +168825,7 @@ "name": "ElasticsearchServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1265-L1267" + "specLocation": "inference/_types/CommonTypes.ts#L1263-L1265" }, { "kind": "interface", @@ -168816,7 +168848,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1251-L1257" + "specLocation": "inference/_types/CommonTypes.ts#L1249-L1255" }, { "kind": "enum", @@ -168835,7 +168867,7 @@ "name": "ElasticsearchTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1259-L1263" + "specLocation": "inference/_types/CommonTypes.ts#L1257-L1261" }, { "kind": "interface", @@ -168881,7 +168913,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1269-L1295" + "specLocation": "inference/_types/CommonTypes.ts#L1267-L1293" }, { "kind": "enum", @@ -168894,7 +168926,7 @@ "name": "ElserServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1301-L1303" + "specLocation": "inference/_types/CommonTypes.ts#L1299-L1301" }, { "kind": "enum", @@ -168907,7 +168939,7 @@ "name": "ElserTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1297-L1299" + "specLocation": "inference/_types/CommonTypes.ts#L1295-L1297" }, { "kind": "enum", @@ -168920,7 +168952,7 @@ "name": "GoogleAiServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1328-L1330" + "specLocation": "inference/_types/CommonTypes.ts#L1326-L1328" }, { "kind": "interface", @@ -168968,7 +169000,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1305-L1321" + "specLocation": "inference/_types/CommonTypes.ts#L1303-L1319" }, { "kind": "enum", @@ -168984,7 +169016,7 @@ "name": "GoogleAiStudioTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1323-L1326" + "specLocation": "inference/_types/CommonTypes.ts#L1321-L1324" }, { "kind": "interface", @@ -169058,7 +169090,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1332-L1358" + "specLocation": "inference/_types/CommonTypes.ts#L1330-L1356" }, { "kind": "enum", @@ -169071,7 +169103,7 @@ "name": "GoogleVertexAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1378-L1380" + "specLocation": "inference/_types/CommonTypes.ts#L1376-L1378" }, { "kind": "interface", @@ -169105,7 +169137,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1360-L1369" + "specLocation": "inference/_types/CommonTypes.ts#L1358-L1367" }, { "kind": "enum", @@ -169127,7 +169159,7 @@ "name": "GoogleVertexAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1371-L1376" + "specLocation": "inference/_types/CommonTypes.ts#L1369-L1374" }, { "kind": "interface", @@ -169189,7 +169221,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1382-L1414" + "specLocation": "inference/_types/CommonTypes.ts#L1380-L1412" }, { "kind": "enum", @@ -169202,7 +169234,7 @@ "name": "HuggingFaceServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1435-L1437" + "specLocation": "inference/_types/CommonTypes.ts#L1433-L1435" }, { "kind": "interface", @@ -169236,7 +169268,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1416-L1426" + "specLocation": "inference/_types/CommonTypes.ts#L1414-L1424" }, { "kind": "enum", @@ -169258,7 +169290,7 @@ "name": "HuggingFaceTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1428-L1433" + "specLocation": "inference/_types/CommonTypes.ts#L1426-L1431" }, { "kind": "interface", @@ -169308,7 +169340,36 @@ } }, { - "description": "The chunking strategy: `sentence` or `word`.", + "description": "This parameter is only applicable when using the `recursive` chunking strategy.\n\nSets a predefined list of separators in the saved chunking settings based on the selected text type.\nValues can be `markdown` or `plaintext`.\n\nUsing this parameter is an alternative to manually specifying a custom `separators` list.", + "name": "separator_group", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "A list of strings used as possible split points when chunking text with the `recursive` strategy.\n\nEach string can be a plain string or a regular expression (regex) pattern.\nThe system tries each separator in order to split the text, starting from the first item in the list.\n\nAfter splitting, it attempts to recombine smaller pieces into larger chunks that stay within\nthe `max_chunk_size` limit, to reduce the total number of chunks generated.", + "name": "separators", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "description": "The chunking strategy: `sentence`, `word`, `none` or `recursive`.\n\n * If `strategy` is set to `recursive`, you must also specify:\n\n- `max_chunk_size`\n- either `separators` or`separator_group`\n\nLearn more about different chunking strategies in the linked documentation.", + "extDocId": "chunking-strategies", + "extDocUrl": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#chunking-strategies", "name": "strategy", "required": false, "serverDefault": "sentence", @@ -169321,7 +169382,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L288-L317" + "specLocation": "inference/_types/Services.ts#L288-L344" }, { "kind": "interface", @@ -170341,7 +170402,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1439-L1468" + "specLocation": "inference/_types/CommonTypes.ts#L1437-L1466" }, { "kind": "enum", @@ -170354,7 +170415,7 @@ "name": "JinaAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1498-L1500" + "specLocation": "inference/_types/CommonTypes.ts#L1496-L1498" }, { "kind": "enum", @@ -170373,7 +170434,7 @@ "name": "JinaAISimilarityType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1502-L1506" + "specLocation": "inference/_types/CommonTypes.ts#L1500-L1504" }, { "kind": "interface", @@ -170419,7 +170480,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1470-L1491" + "specLocation": "inference/_types/CommonTypes.ts#L1468-L1489" }, { "kind": "enum", @@ -170435,7 +170496,7 @@ "name": "JinaAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1493-L1496" + "specLocation": "inference/_types/CommonTypes.ts#L1491-L1494" }, { "kind": "enum", @@ -170457,7 +170518,7 @@ "name": "JinaAITextEmbeddingTask", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1508-L1513" + "specLocation": "inference/_types/CommonTypes.ts#L1506-L1511" }, { "kind": "interface", @@ -170615,7 +170676,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1515-L1542" + "specLocation": "inference/_types/CommonTypes.ts#L1513-L1540" }, { "kind": "enum", @@ -170628,7 +170689,7 @@ "name": "MistralServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1550-L1552" + "specLocation": "inference/_types/CommonTypes.ts#L1548-L1550" }, { "kind": "enum", @@ -170647,7 +170708,7 @@ "name": "MistralTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1544-L1548" + "specLocation": "inference/_types/CommonTypes.ts#L1542-L1546" }, { "kind": "interface", @@ -170734,7 +170795,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1554-L1596" + "specLocation": "inference/_types/CommonTypes.ts#L1552-L1594" }, { "kind": "enum", @@ -170747,7 +170808,7 @@ "name": "OpenAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1612-L1614" + "specLocation": "inference/_types/CommonTypes.ts#L1610-L1612" }, { "kind": "interface", @@ -170769,7 +170830,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1598-L1604" + "specLocation": "inference/_types/CommonTypes.ts#L1596-L1602" }, { "kind": "enum", @@ -170788,7 +170849,7 @@ "name": "OpenAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1606-L1610" + "specLocation": "inference/_types/CommonTypes.ts#L1604-L1608" }, { "kind": "interface", @@ -170855,7 +170916,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L323-L349" + "specLocation": "inference/_types/Services.ts#L350-L376" }, { "kind": "interface", @@ -171003,7 +171064,7 @@ "name": "ServiceSettings", "namespace": "inference._types" }, - "specLocation": "inference/_types/Services.ts#L319-L319", + "specLocation": "inference/_types/Services.ts#L346-L346", "type": { "kind": "user_defined_value" } @@ -171087,7 +171148,7 @@ "name": "TaskSettings", "namespace": "inference._types" }, - "specLocation": "inference/_types/Services.ts#L321-L321", + "specLocation": "inference/_types/Services.ts#L348-L348", "type": { "kind": "user_defined_value" } @@ -171701,7 +171762,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1616-L1647" + "specLocation": "inference/_types/CommonTypes.ts#L1614-L1645" }, { "kind": "enum", @@ -171714,7 +171775,7 @@ "name": "VoyageAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1680-L1682" + "specLocation": "inference/_types/CommonTypes.ts#L1678-L1680" }, { "kind": "interface", @@ -171774,7 +171835,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1649-L1673" + "specLocation": "inference/_types/CommonTypes.ts#L1647-L1671" }, { "kind": "enum", @@ -171790,7 +171851,7 @@ "name": "VoyageAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1675-L1678" + "specLocation": "inference/_types/CommonTypes.ts#L1673-L1676" }, { "kind": "interface", @@ -171878,7 +171939,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1684-L1722" + "specLocation": "inference/_types/CommonTypes.ts#L1682-L1720" }, { "kind": "enum", @@ -171891,7 +171952,7 @@ "name": "WatsonxServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1730-L1732" + "specLocation": "inference/_types/CommonTypes.ts#L1728-L1730" }, { "kind": "enum", @@ -171910,7 +171971,7 @@ "name": "WatsonxTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1724-L1728" + "specLocation": "inference/_types/CommonTypes.ts#L1722-L1726" }, { "kind": "request", @@ -172637,7 +172698,7 @@ } } }, - "description": "Create an inference endpoint.\n\nIMPORTANT: 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.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, 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.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`completion`, `chat_completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`text_embedding`, `rerank`)\n* Watsonx inference integration (`text_embedding`)\n* JinaAI (`text_embedding`, `rerank`)", + "description": "Create an inference endpoint.\n\nIMPORTANT: 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.\nFor built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.\nHowever, 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.\n\nThe following integrations are available through the inference API. You can find the available task types next to the integration name:\n* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Amazon Bedrock (`completion`, `text_embedding`)\n* Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)\n* Anthropic (`completion`)\n* Azure AI Studio (`completion`, `text_embedding`)\n* Azure OpenAI (`completion`, `text_embedding`)\n* Cohere (`completion`, `rerank`, `text_embedding`)\n* DeepSeek (`chat_completion`, `completion`)\n* Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)\n* ELSER (`sparse_embedding`)\n* Google AI Studio (`completion`, `text_embedding`)\n* Google Vertex AI (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)\n* JinaAI (`rerank`, `text_embedding`)\n* Llama (`chat_completion`, `completion`, `text_embedding`)\n* Mistral (`chat_completion`, `completion`, `text_embedding`)\n* OpenAI (`chat_completion`, `completion`, `text_embedding`)\n* VoyageAI (`rerank`, `text_embedding`)\n* Watsonx inference integration (`text_embedding`)", "examples": { "InferencePutExample1": { "alternatives": [ @@ -172668,7 +172729,7 @@ ], "description": "An example body for a `PUT _inference/rerank/my-rerank-model` request.", "method_request": "PUT _inference/rerank/my-rerank-model", - "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n}" + "value": "{\n \"service\": \"cohere\",\n \"service_settings\": {\n \"model_id\": \"rerank-english-v3.0\",\n \"api_key\": \"{{COHERE_API_KEY}}\"\n }\n \"chunking_settings\": {\n \"strategy\": \"recursive\",\n \"max_chunk_size\": 200,\n \"separator_group\": \"markdown\"\n}" } }, "inherits": { @@ -172722,7 +172783,7 @@ } } ], - "specLocation": "inference/put/PutRequest.ts#L26-L88" + "specLocation": "inference/put/PutRequest.ts#L26-L89" }, { "kind": "response", @@ -173266,6 +173327,38 @@ ] }, "description": "Create an Amazon SageMaker inference endpoint.\n\nCreate an inference endpoint to perform an inference task with the `amazon_sagemaker` service.", + "examples": { + "PutAmazonSageMakerRequestExample1": { + "description": "Run `PUT _inference/text_embedding/amazon_sagemaker_embeddings` to create an inference endpoint that performs a text embedding task.", + "method_request": "PUT _inference/text_embedding/amazon_sagemaker_embeddings", + "summary": "A text embedding task", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\",\n \"dimensions\": 384,\n \"element_type\": \"float\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample2": { + "description": "Run `PUT _inference/completion/amazon_sagemaker_completion` to create an inference endpoint that performs a completion task.", + "method_request": "PUT _inference/completion/amazon_sagemaker_completion", + "summary": "A completion task", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample3": { + "description": "Run `PUT _inference/chat_completion/amazon_sagemaker_chat_completion` to create an inference endpoint that performs a chat completion task.", + "method_request": "PUT _inference/chat_completion/amazon_sagemaker_chat_completion", + "summary": "A chat completion task", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample4": { + "description": "Run `PUT _inference/sparse_embedding/amazon_sagemaker_sparse_embedding` to create an inference endpoint that performs a sparse embedding task.", + "method_request": "PUT _inference/sparse_embedding/amazon_sagemaker_sparse_embedding", + "summary": "A sparse embedding task", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + }, + "PutAmazonSageMakerRequestExample5": { + "description": "Run `PUT _inference/rerank/amazon_sagemaker_rerank` to create an inference endpoint that performs a rerank task.", + "method_request": "PUT _inference/rerank/amazon_sagemaker_rerank", + "summary": "A rerank task", + "value": "{\n \"service\": \"amazon_sagemaker\",\n \"service_settings\": {\n \"access_key\": \"AWS-access-key\",\n \"secret_key\": \"AWS-secret-key\",\n \"region\": \"us-east-1\",\n \"api\": \"elastic\",\n \"endpoint_name\": \"my-endpoint\"\n }\n}" + } + }, "inherits": { "type": { "name": "RequestBase", @@ -174168,6 +174261,38 @@ ] }, "description": "Create a custom inference endpoint.\n\nThe custom service gives more control over how to interact with external inference services that aren't explicitly supported through dedicated integrations.\nThe custom service gives you the ability to define the headers, url, query parameters, request body, and secrets.\nThe custom service supports the template replacement functionality, which enables you to define a template that can be replaced with the value associated with that key.\nTemplates are portions of a string that start with `${` and end with `}`.\nThe parameters `secret_parameters` and `task_settings` are checked for keys for template replacement. Template replacement is supported in the `request`, `headers`, `url`, and `query_parameters`.\nIf the definition (key) is not found for a template, an error message is returned.\nIn case of an endpoint definition like the following:\n```\nPUT _inference/text_embedding/test-text-embedding\n{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"...endpoints.huggingface.cloud/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"input\\\": ${input}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n }\n }\n}\n```\nTo replace `${api_key}` the `secret_parameters` and `task_settings` are checked for a key named `api_key`.\n\n> info\n> Templates should not be surrounded by quotes.\n\nPre-defined templates:\n* `${input}` refers to the array of input strings that comes from the `input` field of the subsequent inference requests.\n* `${input_type}` refers to the input type translation values.\n* `${query}` refers to the query field used specifically for reranking tasks.\n* `${top_n}` refers to the `top_n` field available when performing rerank requests.\n* `${return_documents}` refers to the `return_documents` field available when performing rerank requests.", + "examples": { + "PutCustomRequestExample1": { + "description": "Run `PUT _inference/text_embedding/custom-embeddings` to create an inference endpoint that performs a text embedding task.", + "method_request": "PUT _inference/text_embedding/custom-embeddings", + "summary": "Custom text embedding task (OpenAI)", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.openai.com/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json;charset=utf-8\"\n },\n \"request\": \"{\\\"input\\\": ${input}, \\\"model\\\": \\\"text-embedding-3-small\\\"}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\": \"$.data[*].embedding[*]\"\n }\n }\n }\n}" + }, + "PutCustomRequestExample2": { + "description": "Run `PUT _inference/rerank/custom-rerank` to create an inference endpoint that performs a rerank task.", + "method_request": "PUT _inference/rerank/custom-rerank", + "summary": "Custom rerank task (Cohere APIv2)", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.cohere.com/v2/rerank\",\n \"headers\": {\n \"Authorization\": \"bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"documents\\\": ${input}, \\\"query\\\": ${query}, \\\"model\\\": \\\"rerank-v3.5\\\"}\",\n \"response\": {\n \"json_parser\": {\n \"reranked_index\":\"$.results[*].index\",\n \"relevance_score\":\"$.results[*].relevance_score\"\n }\n }\n }\n}" + }, + "PutCustomRequestExample3": { + "description": "Run `PUT _inference/text_embedding/custom-text-embedding` to create an inference endpoint that performs a text embedding task.", + "method_request": "PUT _inference/text_embedding/custom-text-embedding", + "summary": "Custom text embedding task (Cohere APIv2)", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"https://api.cohere.com/v2/embed\",\n \"headers\": {\n \"Authorization\": \"bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"texts\\\": ${input}, \\\"model\\\": \\\"embed-v4.0\\\", \\\"input_type\\\": ${input_type}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.embeddings.float[*]\"\n }\n },\n \"input_type\": {\n \"translation\": {\n \"ingest\": \"search_document\",\n \"search\": \"search_query\"\n },\n \"default\": \"search_document\"\n }\n }\n}" + }, + "PutCustomRequestExample4": { + "description": "Run `PUT _inference/rerank/custom-rerank-jina` to create an inference endpoint that performs a rerank task.", + "method_request": "PUT _inference/rerank/custom-rerank-jina", + "summary": "Custom rerank task (Jina AI)", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n }, \n \"url\": \"https://api.jina.ai/v1/rerank\",\n \"headers\": {\n \"Content-Type\": \"application/json\",\n \"Authorization\": \"Bearer ${api_key}\"\n },\n \"request\": \"{\\\"model\\\": \\\"jina-reranker-v2-base-multilingual\\\",\\\"query\\\": ${query},\\\"documents\\\":${input}}\",\n \"response\": {\n \"json_parser\": {\n \"relevance_score\": \"$.results[*].relevance_score\",\n \"reranked_index\": \"$.results[*].index\"\n }\n }\n }\n}" + }, + "PutCustomRequestExample5": { + "description": "Run `PUT _inference/text_embedding/custom-text-embedding-hf` to create an inference endpoint that performs a text embedding task by using the Qwen/Qwen3-Embedding-8B model.", + "method_request": "PUT _inference/text_embedding/custom-text-embedding-hf", + "summary": "Custom text embedding task (Hugging Face)", + "value": "{\n \"service\": \"custom\",\n \"service_settings\": {\n \"secret_parameters\": {\n \"api_key\": \"\"\n },\n \"url\": \"/v1/embeddings\",\n \"headers\": {\n \"Authorization\": \"Bearer ${api_key}\",\n \"Content-Type\": \"application/json\"\n },\n \"request\": \"{\\\"input\\\": ${input}}\",\n \"response\": {\n \"json_parser\": {\n \"text_embeddings\":\"$.data[*].embedding[*]\"\n }\n }\n }\n}" + } + }, "inherits": { "type": { "name": "RequestBase", @@ -246587,7 +246712,7 @@ "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. Since both documents are being ingested into `my-index`, both pipelines are run using the pipeline definitions that are already in the system.", "method_request": "POST /_ingest/_simulate", "summary": "Existing pipeline definitions", - "value": "{\n \"docs\": [\n {\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + "value": "{\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" }, "SimulateIngestRequestExample2": { "alternatives": [ @@ -246619,7 +246744,7 @@ "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. But a substitute definition of `my-pipeline` is provided in `pipeline_substitutions`. The substitute `my-pipeline` will be used in place of the `my-pipeline` that is in the system, and then the `my-final-pipeline` that is already defined in the system will run.", "method_request": "POST /_ingest/_simulate", "summary": "Pipeline substitions", - "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": 123,\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": 456,\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"uppercase\": {\n \"field\": \"foo\"\n }\n }\n ]\n }\n }\n}" + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"uppercase\": {\n \"field\": \"foo\"\n }\n }\n ]\n }\n }\n}" }, "SimulateIngestRequestExample3": { "alternatives": [ @@ -255198,15 +255323,7 @@ "name": "params", "required": false, "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "singleKey": false, + "kind": "array_of", "value": { "kind": "user_defined_value" } @@ -255341,7 +255458,7 @@ } } ], - "specLocation": "sql/query/QuerySqlRequest.ts#L28-L152" + "specLocation": "sql/query/QuerySqlRequest.ts#L27-L151" }, { "kind": "response", @@ -255463,7 +255580,7 @@ "name": "SqlFormat", "namespace": "sql.query" }, - "specLocation": "sql/query/QuerySqlRequest.ts#L154-L162" + "specLocation": "sql/query/QuerySqlRequest.ts#L153-L161" }, { "kind": "request", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 2a3d50d506..757cabe3b4 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2007,7 +2007,7 @@ export interface TermvectorsRequest extends RequestBase { doc?: TDocument filter?: TermvectorsFilter per_field_analyzer?: Record - fields?: Fields + fields?: Field[] field_statistics?: boolean offsets?: boolean payloads?: boolean @@ -5565,6 +5565,8 @@ export interface MappingByteNumberProperty extends MappingNumberPropertyBase { export interface MappingChunkingSettings { strategy: string + separator_group: string + separators: string[] max_chunk_size: integer overlap?: integer sentence_overlap?: integer @@ -13976,6 +13978,8 @@ export interface InferenceInferenceChunkingSettings { max_chunk_size?: integer overlap?: integer sentence_overlap?: integer + separator_group: string + separators: string[] strategy?: string } @@ -21766,7 +21770,7 @@ export interface SqlQueryRequest extends RequestBase { keep_alive?: Duration keep_on_completion?: boolean page_timeout?: Duration - params?: Record + params?: any[] query?: string request_timeout?: Duration runtime_mappings?: MappingRuntimeFields