From c6138805a8a5c062365b3997922a7586a63a3e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 24 Mar 2025 14:19:05 +0100 Subject: [PATCH 1/3] [8.x] Adds EIS POST inference details. --- output/openapi/elasticsearch-openapi.json | 262 +++---------- .../elasticsearch-serverless-openapi.json | 262 +++---------- output/schema/schema-serverless.json | 358 ++++++++++++------ output/schema/schema.json | 358 ++++++++++++------ output/typescript/types.ts | 29 +- specification/_doc_ids/table.csv | 33 +- .../inference.post_eis_chat_completion.json | 31 ++ specification/inference/_types/CommonTypes.ts | 61 +++ .../chat_completion_unified/UnifiedRequest.ts | 39 +- .../PostEisChatCompletionRequest.ts | 46 +++ .../PostEisChatCompletionResponse.ts | 24 ++ .../PostEisChatCompletionRequestExample.yaml | 17 + 12 files changed, 768 insertions(+), 752 deletions(-) create mode 100644 specification/_json_spec/inference.post_eis_chat_completion.json create mode 100644 specification/inference/_types/CommonTypes.ts create mode 100644 specification/inference/post_eis_chat_completion/PostEisChatCompletionRequest.ts create mode 100644 specification/inference/post_eis_chat_completion/PostEisChatCompletionResponse.ts create mode 100644 specification/inference/post_eis_chat_completion/examples/PostEisChatCompletionRequestExample.yaml diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 797ad4c8e2..6ff9c9a51c 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -17550,52 +17550,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "messages": { - "description": "A list of objects representing the conversation.", - "type": "array", - "items": { - "$ref": "#/components/schemas/inference.chat_completion_unified:Message" - } - }, - "model": { - "description": "The ID of the model to use.", - "type": "string" - }, - "max_completion_tokens": { - "description": "The upper bound limit for the number of tokens that can be generated for a completion request.", - "type": "number" - }, - "stop": { - "description": "A sequence of strings to control when the model should stop generating additional tokens.", - "type": "array", - "items": { - "type": "string" - } - }, - "temperature": { - "description": "The sampling temperature to use.", - "type": "number" - }, - "tool_choice": { - "$ref": "#/components/schemas/inference.chat_completion_unified:CompletionToolType" - }, - "tools": { - "description": "A list of tools that the model can call.", - "type": "array", - "items": { - "$ref": "#/components/schemas/inference.chat_completion_unified:CompletionTool" - } - }, - "top_p": { - "description": "Nucleus sampling, an alternative to sampling with temperature.", - "type": "number" - } - }, - "required": [ - "messages" - ] + "type": "object" } } } @@ -17847,6 +17802,51 @@ "x-state": "Added in 8.11.0" } }, + "/_inference/chat_completion/{eis_inference_id}/_stream": { + "post": { + "tags": [ + "inference" + ], + "summary": "Perform a chat completion task through the Elastic Inference Service (EIS)", + "description": "Perform a chat completion inference task with the `elastic` service.", + "operationId": "inference-post-eis-chat-completion", + "parameters": [ + { + "in": "path", + "name": "eis_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types:StreamResult" + } + } + } + } + }, + "x-state": "Added in 9.0.0" + } + }, "/_inference/{task_type}/{eis_inference_id}": { "put": { "tags": [ @@ -76805,176 +76805,6 @@ "valid" ] }, - "inference.chat_completion_unified:Message": { - "type": "object", - "properties": { - "content": { - "$ref": "#/components/schemas/inference.chat_completion_unified:MessageContent" - }, - "role": { - "description": "The role of the message author.", - "type": "string" - }, - "tool_call_id": { - "$ref": "#/components/schemas/_types:Id" - }, - "tool_calls": { - "description": "The tool calls generated by the model.", - "type": "array", - "items": { - "$ref": "#/components/schemas/inference.chat_completion_unified:ToolCall" - } - } - }, - "required": [ - "role" - ] - }, - "inference.chat_completion_unified:MessageContent": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/inference.chat_completion_unified:ContentObject" - } - } - ] - }, - "inference.chat_completion_unified:ContentObject": { - "type": "object", - "properties": { - "text": { - "description": "The text content.", - "type": "string" - }, - "type": { - "description": "The type of content.", - "type": "string" - } - }, - "required": [ - "text", - "type" - ] - }, - "inference.chat_completion_unified:ToolCall": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types:Id" - }, - "function": { - "$ref": "#/components/schemas/inference.chat_completion_unified:ToolCallFunction" - }, - "type": { - "description": "The type of the tool call.", - "type": "string" - } - }, - "required": [ - "id", - "function", - "type" - ] - }, - "inference.chat_completion_unified:ToolCallFunction": { - "type": "object", - "properties": { - "arguments": { - "description": "The arguments to call the function with in JSON format.", - "type": "string" - }, - "name": { - "description": "The name of the function to call.", - "type": "string" - } - }, - "required": [ - "arguments", - "name" - ] - }, - "inference.chat_completion_unified:CompletionToolType": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/inference.chat_completion_unified:CompletionToolChoice" - } - ] - }, - "inference.chat_completion_unified:CompletionToolChoice": { - "type": "object", - "properties": { - "type": { - "description": "The type of the tool.", - "type": "string" - }, - "function": { - "$ref": "#/components/schemas/inference.chat_completion_unified:CompletionToolChoiceFunction" - } - }, - "required": [ - "type", - "function" - ] - }, - "inference.chat_completion_unified:CompletionToolChoiceFunction": { - "type": "object", - "properties": { - "name": { - "description": "The name of the function to call.", - "type": "string" - } - }, - "required": [ - "name" - ] - }, - "inference.chat_completion_unified:CompletionTool": { - "type": "object", - "properties": { - "type": { - "description": "The type of tool.", - "type": "string" - }, - "function": { - "$ref": "#/components/schemas/inference.chat_completion_unified:CompletionToolFunction" - } - }, - "required": [ - "type", - "function" - ] - }, - "inference.chat_completion_unified:CompletionToolFunction": { - "type": "object", - "properties": { - "description": { - "description": "A description of what the function does.\nThis is used by the model to choose when and how to call the function.", - "type": "string" - }, - "name": { - "description": "The name of the function.", - "type": "string" - }, - "parameters": { - "description": "The parameters the functional accepts. This should be formatted as a JSON object.", - "type": "object" - }, - "strict": { - "description": "Whether to enable schema adherence when generating the function call.", - "type": "boolean" - } - }, - "required": [ - "name" - ] - }, "_types:StreamResult": { "type": "object" }, diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 556bd04a4a..bb143450df 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -9506,52 +9506,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "messages": { - "description": "A list of objects representing the conversation.", - "type": "array", - "items": { - "$ref": "#/components/schemas/inference.chat_completion_unified:Message" - } - }, - "model": { - "description": "The ID of the model to use.", - "type": "string" - }, - "max_completion_tokens": { - "description": "The upper bound limit for the number of tokens that can be generated for a completion request.", - "type": "number" - }, - "stop": { - "description": "A sequence of strings to control when the model should stop generating additional tokens.", - "type": "array", - "items": { - "type": "string" - } - }, - "temperature": { - "description": "The sampling temperature to use.", - "type": "number" - }, - "tool_choice": { - "$ref": "#/components/schemas/inference.chat_completion_unified:CompletionToolType" - }, - "tools": { - "description": "A list of tools that the model can call.", - "type": "array", - "items": { - "$ref": "#/components/schemas/inference.chat_completion_unified:CompletionTool" - } - }, - "top_p": { - "description": "Nucleus sampling, an alternative to sampling with temperature.", - "type": "number" - } - }, - "required": [ - "messages" - ] + "type": "object" } } } @@ -9803,6 +9758,51 @@ "x-state": "Added in 8.11.0" } }, + "/_inference/chat_completion/{eis_inference_id}/_stream": { + "post": { + "tags": [ + "inference" + ], + "summary": "Perform a chat completion task through the Elastic Inference Service (EIS)", + "description": "Perform a chat completion inference task with the `elastic` service.", + "operationId": "inference-post-eis-chat-completion", + "parameters": [ + { + "in": "path", + "name": "eis_inference_id", + "description": "The unique identifier of the inference endpoint.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types:StreamResult" + } + } + } + } + }, + "x-state": "Added in 9.0.0" + } + }, "/_inference/{task_type}/{eis_inference_id}": { "put": { "tags": [ @@ -48125,176 +48125,6 @@ "valid" ] }, - "inference.chat_completion_unified:Message": { - "type": "object", - "properties": { - "content": { - "$ref": "#/components/schemas/inference.chat_completion_unified:MessageContent" - }, - "role": { - "description": "The role of the message author.", - "type": "string" - }, - "tool_call_id": { - "$ref": "#/components/schemas/_types:Id" - }, - "tool_calls": { - "description": "The tool calls generated by the model.", - "type": "array", - "items": { - "$ref": "#/components/schemas/inference.chat_completion_unified:ToolCall" - } - } - }, - "required": [ - "role" - ] - }, - "inference.chat_completion_unified:MessageContent": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/inference.chat_completion_unified:ContentObject" - } - } - ] - }, - "inference.chat_completion_unified:ContentObject": { - "type": "object", - "properties": { - "text": { - "description": "The text content.", - "type": "string" - }, - "type": { - "description": "The type of content.", - "type": "string" - } - }, - "required": [ - "text", - "type" - ] - }, - "inference.chat_completion_unified:ToolCall": { - "type": "object", - "properties": { - "id": { - "$ref": "#/components/schemas/_types:Id" - }, - "function": { - "$ref": "#/components/schemas/inference.chat_completion_unified:ToolCallFunction" - }, - "type": { - "description": "The type of the tool call.", - "type": "string" - } - }, - "required": [ - "id", - "function", - "type" - ] - }, - "inference.chat_completion_unified:ToolCallFunction": { - "type": "object", - "properties": { - "arguments": { - "description": "The arguments to call the function with in JSON format.", - "type": "string" - }, - "name": { - "description": "The name of the function to call.", - "type": "string" - } - }, - "required": [ - "arguments", - "name" - ] - }, - "inference.chat_completion_unified:CompletionToolType": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/inference.chat_completion_unified:CompletionToolChoice" - } - ] - }, - "inference.chat_completion_unified:CompletionToolChoice": { - "type": "object", - "properties": { - "type": { - "description": "The type of the tool.", - "type": "string" - }, - "function": { - "$ref": "#/components/schemas/inference.chat_completion_unified:CompletionToolChoiceFunction" - } - }, - "required": [ - "type", - "function" - ] - }, - "inference.chat_completion_unified:CompletionToolChoiceFunction": { - "type": "object", - "properties": { - "name": { - "description": "The name of the function to call.", - "type": "string" - } - }, - "required": [ - "name" - ] - }, - "inference.chat_completion_unified:CompletionTool": { - "type": "object", - "properties": { - "type": { - "description": "The type of tool.", - "type": "string" - }, - "function": { - "$ref": "#/components/schemas/inference.chat_completion_unified:CompletionToolFunction" - } - }, - "required": [ - "type", - "function" - ] - }, - "inference.chat_completion_unified:CompletionToolFunction": { - "type": "object", - "properties": { - "description": { - "description": "A description of what the function does.\nThis is used by the model to choose when and how to call the function.", - "type": "string" - }, - "name": { - "description": "The name of the function.", - "type": "string" - }, - "parameters": { - "description": "The parameters the functional accepts. This should be formatted as a JSON object.", - "type": "object" - }, - "strict": { - "description": "Whether to enable schema adherence when generating the function call.", - "type": "boolean" - } - }, - "required": [ - "name" - ] - }, "_types:StreamResult": { "type": "object" }, diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 05bdcd6380..0114954f8f 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -4662,6 +4662,51 @@ } ] }, + { + "availability": { + "serverless": { + "stability": "stable", + "visibility": "public" + }, + "stack": { + "since": "9.0.0", + "stability": "stable", + "visibility": "public" + } + }, + "description": "Perform a chat completion task through the Elastic Inference Service (EIS).\n\nPerform a chat completion inference task with the `elastic` service.", + "docId": "inference-api-post-eis-chat-completion", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-post-eis-chat-completion", + "name": "inference.post_eis_chat_completion", + "privileges": { + "cluster": [ + "manage_inference" + ] + }, + "request": { + "name": "Request", + "namespace": "inference.post_eis_chat_completion" + }, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "inference.post_eis_chat_completion" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "POST" + ], + "path": "/_inference/chat_completion/{eis_inference_id}/_stream" + } + ] + }, { "availability": { "serverless": { @@ -26975,119 +27020,13 @@ ], "body": { "kind": "properties", - "properties": [ - { - "description": "A list of objects representing the conversation.", - "name": "messages", - "required": true, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "Message", - "namespace": "inference.chat_completion_unified" - } - } - } - }, - { - "description": "The ID of the model to use.", - "name": "model", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "description": "The upper bound limit for the number of tokens that can be generated for a completion request.", - "name": "max_completion_tokens", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } - }, - { - "description": "A sequence of strings to control when the model should stop generating additional tokens.", - "name": "stop", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - } - }, - { - "description": "The sampling temperature to use.", - "name": "temperature", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "float", - "namespace": "_types" - } - } - }, - { - "description": "Controls which tool is called by the model.", - "name": "tool_choice", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "CompletionToolType", - "namespace": "inference.chat_completion_unified" - } - } - }, - { - "description": "A list of tools that the model can call.", - "name": "tools", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "CompletionTool", - "namespace": "inference.chat_completion_unified" - } - } - } - }, - { - "description": "Nucleus sampling, an alternative to sampling with temperature.", - "name": "top_p", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "float", - "namespace": "_types" - } - } - } - ] + "properties": [] }, "description": "Perform chat completion inference", "inherits": { "type": { - "name": "RequestBase", - "namespace": "_types" + "name": "RequestChatCompletionBase", + "namespace": "inference._types" } }, "kind": "request", @@ -27124,7 +27063,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L26-L87" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L25-L52" }, { "body": { @@ -27421,6 +27360,61 @@ }, "specLocation": "inference/get/GetResponse.ts#L22-L26" }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [] + }, + "description": "Perform a chat completion task through the Elastic Inference Service (EIS).\n\nPerform a chat completion inference task with the `elastic` service.", + "inherits": { + "type": { + "name": "RequestChatCompletionBase", + "namespace": "inference._types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "inference.post_eis_chat_completion" + }, + "path": [ + { + "description": "The unique identifier of the inference endpoint.", + "name": "eis_inference_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "inference/post_eis_chat_completion/PostEisChatCompletionRequest.ts#L23-L46" + }, + { + "body": { + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "StreamResult", + "namespace": "_types" + } + } + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "inference.post_eis_chat_completion" + }, + "specLocation": "inference/post_eis_chat_completion/PostEisChatCompletionResponse.ts#L22-L24" + }, { "attachedBehaviors": [ "CommonQueryParameters" @@ -100216,7 +100210,7 @@ "name": "CompletionToolType", "namespace": "inference.chat_completion_unified" }, - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L89-L92", + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L54-L57", "type": { "items": [ { @@ -100270,7 +100264,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L178-L190" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L143-L155" }, { "description": "The tool choice function.", @@ -100293,7 +100287,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L167-L176" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L132-L141" }, { "codegenNames": [ @@ -100305,7 +100299,7 @@ "name": "MessageContent", "namespace": "inference.chat_completion_unified" }, - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L140-L143", + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L105-L108", "type": { "items": [ { @@ -100362,7 +100356,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L94-L106" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L59-L71" }, { "kind": "enum", @@ -120306,6 +120300,130 @@ ], "specLocation": "indices/validate_query/IndicesValidateQueryResponse.ts#L32-L37" }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "interface", + "name": { + "name": "RequestChatCompletionBase", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "A list of objects representing the conversation.", + "name": "messages", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Message", + "namespace": "inference.chat_completion_unified" + } + } + } + }, + { + "description": "The ID of the model to use.", + "name": "model", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The upper bound limit for the number of tokens that can be generated for a completion request.", + "name": "max_completion_tokens", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "description": "A sequence of strings to control when the model should stop generating additional tokens.", + "name": "stop", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "description": "The sampling temperature to use.", + "name": "temperature", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "float", + "namespace": "_types" + } + } + }, + { + "description": "Controls which tool is called by the model.", + "name": "tool_choice", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "CompletionToolType", + "namespace": "inference.chat_completion_unified" + } + } + }, + { + "description": "A list of tools that the model can call.", + "name": "tools", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "CompletionTool", + "namespace": "inference.chat_completion_unified" + } + } + } + }, + { + "description": "Nucleus sampling, an alternative to sampling with temperature.", + "name": "top_p", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "float", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/_types/CommonTypes.ts#L28-L61" + }, { "description": "An object representing part of the conversation.", "kind": "interface", @@ -120366,7 +120484,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L145-L165" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L110-L130" }, { "description": "A tool call generated by the model.", @@ -120413,7 +120531,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L122-L138" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L87-L103" }, { "description": "The function that the model called.", @@ -120448,7 +120566,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L108-L120" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L73-L85" }, { "description": "A list of tools that the model can call.", @@ -120483,7 +120601,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L215-L227" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L180-L192" }, { "description": "The completion tool function definition.", @@ -120538,7 +120656,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L192-L213" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L157-L178" }, { "description": "Defines the completion result.", diff --git a/output/schema/schema.json b/output/schema/schema.json index 2efef2cf3e..19fb9c9ddd 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -9256,6 +9256,51 @@ } ] }, + { + "availability": { + "serverless": { + "stability": "stable", + "visibility": "public" + }, + "stack": { + "since": "9.0.0", + "stability": "stable", + "visibility": "public" + } + }, + "description": "Perform a chat completion task through the Elastic Inference Service (EIS).\n\nPerform a chat completion inference task with the `elastic` service.", + "docId": "inference-api-post-eis-chat-completion", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-post-eis-chat-completion", + "name": "inference.post_eis_chat_completion", + "privileges": { + "cluster": [ + "manage_inference" + ] + }, + "request": { + "name": "Request", + "namespace": "inference.post_eis_chat_completion" + }, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "inference.post_eis_chat_completion" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "POST" + ], + "path": "/_inference/chat_completion/{eis_inference_id}/_stream" + } + ] + }, { "availability": { "serverless": { @@ -149184,6 +149229,130 @@ ], "specLocation": "inference/_types/Services.ts#L95-L100" }, + { + "kind": "interface", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "RequestChatCompletionBase", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "A list of objects representing the conversation.", + "name": "messages", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Message", + "namespace": "inference.chat_completion_unified" + } + } + } + }, + { + "description": "The ID of the model to use.", + "name": "model", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The upper bound limit for the number of tokens that can be generated for a completion request.", + "name": "max_completion_tokens", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "description": "A sequence of strings to control when the model should stop generating additional tokens.", + "name": "stop", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "description": "The sampling temperature to use.", + "name": "temperature", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "float", + "namespace": "_types" + } + } + }, + { + "description": "Controls which tool is called by the model.", + "name": "tool_choice", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "CompletionToolType", + "namespace": "inference.chat_completion_unified" + } + } + }, + { + "description": "A list of tools that the model can call.", + "name": "tools", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "CompletionTool", + "namespace": "inference.chat_completion_unified" + } + } + } + }, + { + "description": "Nucleus sampling, an alternative to sampling with temperature.", + "name": "top_p", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "float", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/_types/CommonTypes.ts#L28-L61" + }, { "kind": "interface", "description": "Defines the response for a rerank request.", @@ -149462,7 +149631,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L215-L227" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L180-L192" }, { "kind": "interface", @@ -149497,7 +149666,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L178-L190" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L143-L155" }, { "kind": "interface", @@ -149520,7 +149689,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L167-L176" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L132-L141" }, { "kind": "interface", @@ -149575,7 +149744,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L192-L213" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L157-L178" }, { "kind": "type_alias", @@ -149587,7 +149756,7 @@ "name": "CompletionToolType", "namespace": "inference.chat_completion_unified" }, - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L89-L92", + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L54-L57", "type": { "kind": "union_of", "items": [ @@ -149641,7 +149810,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L94-L106" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L59-L71" }, { "kind": "interface", @@ -149703,7 +149872,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L145-L165" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L110-L130" }, { "kind": "type_alias", @@ -149715,7 +149884,7 @@ "name": "MessageContent", "namespace": "inference.chat_completion_unified" }, - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L140-L143", + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L105-L108", "type": { "kind": "union_of", "items": [ @@ -149746,119 +149915,13 @@ ], "body": { "kind": "properties", - "properties": [ - { - "description": "A list of objects representing the conversation.", - "name": "messages", - "required": true, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "Message", - "namespace": "inference.chat_completion_unified" - } - } - } - }, - { - "description": "The ID of the model to use.", - "name": "model", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "description": "The upper bound limit for the number of tokens that can be generated for a completion request.", - "name": "max_completion_tokens", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } - }, - { - "description": "A sequence of strings to control when the model should stop generating additional tokens.", - "name": "stop", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - } - }, - { - "description": "The sampling temperature to use.", - "name": "temperature", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "float", - "namespace": "_types" - } - } - }, - { - "description": "Controls which tool is called by the model.", - "name": "tool_choice", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "CompletionToolType", - "namespace": "inference.chat_completion_unified" - } - } - }, - { - "description": "A list of tools that the model can call.", - "name": "tools", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "CompletionTool", - "namespace": "inference.chat_completion_unified" - } - } - } - }, - { - "description": "Nucleus sampling, an alternative to sampling with temperature.", - "name": "top_p", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "float", - "namespace": "_types" - } - } - } - ] + "properties": [] }, "description": "Perform chat completion inference", "inherits": { "type": { - "name": "RequestBase", - "namespace": "_types" + "name": "RequestChatCompletionBase", + "namespace": "inference._types" } }, "name": { @@ -149894,7 +149957,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L26-L87" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L25-L52" }, { "kind": "response", @@ -149959,7 +150022,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L122-L138" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L87-L103" }, { "kind": "interface", @@ -149994,7 +150057,7 @@ } } ], - "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L108-L120" + "specLocation": "inference/chat_completion_unified/UnifiedRequest.ts#L73-L85" }, { "kind": "request", @@ -150273,6 +150336,61 @@ }, "specLocation": "inference/get/GetResponse.ts#L22-L26" }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [] + }, + "description": "Perform a chat completion task through the Elastic Inference Service (EIS).\n\nPerform a chat completion inference task with the `elastic` service.", + "inherits": { + "type": { + "name": "RequestChatCompletionBase", + "namespace": "inference._types" + } + }, + "name": { + "name": "Request", + "namespace": "inference.post_eis_chat_completion" + }, + "path": [ + { + "description": "The unique identifier of the inference endpoint.", + "name": "eis_inference_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "inference/post_eis_chat_completion/PostEisChatCompletionRequest.ts#L23-L46" + }, + { + "kind": "response", + "body": { + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "StreamResult", + "namespace": "_types" + } + } + }, + "name": { + "name": "Response", + "namespace": "inference.post_eis_chat_completion" + }, + "specLocation": "inference/post_eis_chat_completion/PostEisChatCompletionResponse.ts#L22-L24" + }, { "kind": "request", "attachedBehaviors": [ diff --git a/output/typescript/types.ts b/output/typescript/types.ts index f2da1011c5..86487afe79 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -13109,6 +13109,17 @@ export interface InferenceRateLimitSetting { requests_per_minute?: integer } +export interface InferenceRequestChatCompletionBase extends RequestBase { + messages: InferenceChatCompletionUnifiedMessage[] + model?: string + max_completion_tokens?: long + stop?: string[] + temperature?: float + tool_choice?: InferenceChatCompletionUnifiedCompletionToolType + tools?: InferenceChatCompletionUnifiedCompletionTool[] + top_p?: float +} + export interface InferenceRerankedInferenceResult { rerank: InferenceRankedDocument[] } @@ -13180,19 +13191,9 @@ export interface InferenceChatCompletionUnifiedMessage { export type InferenceChatCompletionUnifiedMessageContent = string | InferenceChatCompletionUnifiedContentObject[] -export interface InferenceChatCompletionUnifiedRequest extends RequestBase { +export interface InferenceChatCompletionUnifiedRequest extends InferenceRequestChatCompletionBase { inference_id: Id timeout?: Duration - body?: { - messages: InferenceChatCompletionUnifiedMessage[] - model?: string - max_completion_tokens?: long - stop?: string[] - temperature?: float - tool_choice?: InferenceChatCompletionUnifiedCompletionToolType - tools?: InferenceChatCompletionUnifiedCompletionTool[] - top_p?: float - } } export type InferenceChatCompletionUnifiedResponse = StreamResult @@ -13237,6 +13238,12 @@ export interface InferenceGetResponse { endpoints: InferenceInferenceEndpointInfo[] } +export interface InferencePostEisChatCompletionRequest extends InferenceRequestChatCompletionBase { + eis_inference_id: Id +} + +export type InferencePostEisChatCompletionResponse = StreamResult + export interface InferencePutRequest extends RequestBase { task_type?: InferenceTaskType inference_id: Id diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index 92b80a12b1..c844cf2595 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -317,6 +317,7 @@ infer-trained-model-deployment,https://www.elastic.co/guide/en/elasticsearch/ref inference-api-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-inference-api.html inference-api-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-inference-api.html inference-api-post,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/post-inference-api.html +inference-api-post-eis-chat-completion,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/post-inference-api.html inference-api-put,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/put-inference-api.html inference-api-put-eis,https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-elastic.html inference-api-put-openai,https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-openai.html @@ -821,37 +822,6 @@ terminate-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{bra test-grok-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/test-grok-pattern.html time-value,https://github.com/elastic/elasticsearch/blob/{branch}/libs/core/src/main/java/org/elasticsearch/core/TimeValue.java time-zone-id,https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html -<<<<<<< HEAD -trim-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/trim-processor.html -unfreeze-index-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/unfreeze-index-api.html -update-dfanalytics,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-dfanalytics.html -update-desired-nodes,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-desired-nodes.html -update-license,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-license.html -update-trained-model-deployment,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-trained-model-deployment.html -update-transform,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-transform.html -upgrade-transforms,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/upgrade-transforms.html -uppercase-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/uppercase-processor.html -urldecode-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/urldecode-processor.html -usage-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/usage-api.html -user-agent-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/user-agent-processor.html -user-profile,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/user-profile.html -verify-repository,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/snapshots-register-repository.html#snapshots-repository-verification -voting-config-exclusions,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/voting-config-exclusions.html -watcher-works,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/how-watcher-works.html -watcher-api-ack-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-ack-watch.html -watcher-api-activate-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-activate-watch.html -watcher-api-deactivate-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-deactivate-watch.html -watcher-api-delete-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-delete-watch.html -watcher-api-execute-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-execute-watch.html -watcher-api-get-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-get-settings.html -watcher-api-get-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-get-watch.html -watcher-api-put-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-put-watch.html -watcher-api-query-watches,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-query-watches.html -watcher-api-start,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-start.html -watcher-api-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-stats.html -watcher-api-stop,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-stop.html -watcher-api-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-update-settings.html -======= trim-processor,https://www.elastic.co/guide/en/elasticsearch/reference/current/trim-processor.html update-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-data-frame-analytics update-desired-nodes,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster @@ -882,7 +852,6 @@ watcher-api-start,https://www.elastic.co/docs/api/doc/elasticsearch/operation/op watcher-api-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stats watcher-api-stop,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stop watcher-api-update-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-update-settings ->>>>>>> dbe2d1fea (Adds VoyageAI PUT inference details (#4009)) watsonx-api-keys,https://cloud.ibm.com/iam/apikeys watsonx-api-models,https://www.ibm.com/products/watsonx-ai/foundation-models watsonx-api-version,https://cloud.ibm.com/apidocs/watsonx-ai#active-version-dates diff --git a/specification/_json_spec/inference.post_eis_chat_completion.json b/specification/_json_spec/inference.post_eis_chat_completion.json new file mode 100644 index 0000000000..e34b14913b --- /dev/null +++ b/specification/_json_spec/inference.post_eis_chat_completion.json @@ -0,0 +1,31 @@ +{ + "inference.post_eis_chat_completion": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/inference-apis.html", + "description": "Perform a chat completion task via the Elastic Inference Service (EIS)" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_inference/chat_completion/{eis_inference_id}/_stream", + "methods": ["POST"], + "parts": { + "eis_inference_id": { + "type": "string", + "description": "The inference ID" + } + } + } + ] + }, + "body": { + "description": "The inference tasks settings to perform" + } + } +} diff --git a/specification/inference/_types/CommonTypes.ts b/specification/inference/_types/CommonTypes.ts new file mode 100644 index 0000000000..8879466eb3 --- /dev/null +++ b/specification/inference/_types/CommonTypes.ts @@ -0,0 +1,61 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { + CompletionTool, + CompletionToolType, + Message +} from '@inference/chat_completion_unified/UnifiedRequest' +import { RequestBase } from '@_types/Base' +import { float, long } from '@_types/Numeric' + +export interface RequestChatCompletionBase extends RequestBase { + /** + * A list of objects representing the conversation. + */ + messages: Array + /** + * The ID of the model to use. + */ + model?: string + /** + * The upper bound limit for the number of tokens that can be generated for a completion request. + */ + max_completion_tokens?: long + /** + * A sequence of strings to control when the model should stop generating additional tokens. + */ + stop?: Array + /** + * The sampling temperature to use. + */ + temperature?: float + /** + * Controls which tool is called by the model. + */ + tool_choice?: CompletionToolType + /** + * A list of tools that the model can call. + */ + tools?: Array + /** + * Nucleus sampling, an alternative to sampling with temperature. + */ + top_p?: float +} diff --git a/specification/inference/chat_completion_unified/UnifiedRequest.ts b/specification/inference/chat_completion_unified/UnifiedRequest.ts index ac460afa95..1932021931 100644 --- a/specification/inference/chat_completion_unified/UnifiedRequest.ts +++ b/specification/inference/chat_completion_unified/UnifiedRequest.ts @@ -17,10 +17,9 @@ * under the License. */ +import { RequestChatCompletionBase } from '@inference/_types/CommonTypes' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' -import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' -import { float, long } from '@_types/Numeric' import { Duration } from '@_types/Time' /** @@ -30,7 +29,7 @@ import { Duration } from '@_types/Time' * @availability serverless stability=stable visibility=public * @doc_id inference-api-chat-completion */ -export interface Request extends RequestBase { +export interface Request extends RequestChatCompletionBase { urls: [ { path: '/_inference/chat_completion/{inference_id}/_stream' @@ -50,40 +49,6 @@ export interface Request extends RequestBase { */ timeout?: Duration } - body: { - /** - * A list of objects representing the conversation. - */ - messages: Array - /** - * The ID of the model to use. - */ - model?: string - /** - * The upper bound limit for the number of tokens that can be generated for a completion request. - */ - max_completion_tokens?: long - /** - * A sequence of strings to control when the model should stop generating additional tokens. - */ - stop?: Array - /** - * The sampling temperature to use. - */ - temperature?: float - /** - * Controls which tool is called by the model. - */ - tool_choice?: CompletionToolType - /** - * A list of tools that the model can call. - */ - tools?: Array - /** - * Nucleus sampling, an alternative to sampling with temperature. - */ - top_p?: float - } } /** diff --git a/specification/inference/post_eis_chat_completion/PostEisChatCompletionRequest.ts b/specification/inference/post_eis_chat_completion/PostEisChatCompletionRequest.ts new file mode 100644 index 0000000000..6088a1b0a1 --- /dev/null +++ b/specification/inference/post_eis_chat_completion/PostEisChatCompletionRequest.ts @@ -0,0 +1,46 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { RequestChatCompletionBase } from '@inference/_types/CommonTypes' +import { Id } from '@_types/common' + +/** + * Perform a chat completion task through the Elastic Inference Service (EIS). + * + * Perform a chat completion inference task with the `elastic` service. + * @rest_spec_name inference.post_eis_chat_completion + * @availability stack since=9.0.0 stability=stable visibility=public + * @availability serverless stability=stable visibility=public + * @cluster_privileges manage_inference + * @doc_id inference-api-post-eis-chat-completion + */ +export interface Request extends RequestChatCompletionBase { + urls: [ + { + path: '/_inference/chat_completion/{eis_inference_id}/_stream' + methods: ['POST'] + } + ] + path_parts: { + /** + * The unique identifier of the inference endpoint. + */ + eis_inference_id: Id + } +} diff --git a/specification/inference/post_eis_chat_completion/PostEisChatCompletionResponse.ts b/specification/inference/post_eis_chat_completion/PostEisChatCompletionResponse.ts new file mode 100644 index 0000000000..74b823bf40 --- /dev/null +++ b/specification/inference/post_eis_chat_completion/PostEisChatCompletionResponse.ts @@ -0,0 +1,24 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { StreamResult } from '@_types/Binary' + +export class Response { + body: StreamResult +} diff --git a/specification/inference/post_eis_chat_completion/examples/PostEisChatCompletionRequestExample.yaml b/specification/inference/post_eis_chat_completion/examples/PostEisChatCompletionRequestExample.yaml new file mode 100644 index 0000000000..575da1bfa6 --- /dev/null +++ b/specification/inference/post_eis_chat_completion/examples/PostEisChatCompletionRequestExample.yaml @@ -0,0 +1,17 @@ +summary: A chat completion task +description: Run `POST /_inference/chat_completion//_stream` to perform a streaming chat completion task type. +# method_request: "POST /_inference/chat_completion/.rainbow-sprinkles-elastic/_stream" +# type: "request" +value: |- + { + "parameters": + "messages": [ + { + "role": "user", + "content": "Say yes if it works." + } + ], + "temperature": 0.7, + "max_completion_tokens": 300 + } + } From bf17562ca95023abb92201f370051e9a2eff2836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 24 Mar 2025 15:27:40 +0100 Subject: [PATCH 2/3] Make contrib. --- specification/_doc_ids/table.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index c844cf2595..0433bc33a8 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -823,6 +823,7 @@ test-grok-pattern,https://www.elastic.co/guide/en/elasticsearch/reference/{branc time-value,https://github.com/elastic/elasticsearch/blob/{branch}/libs/core/src/main/java/org/elasticsearch/core/TimeValue.java time-zone-id,https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html trim-processor,https://www.elastic.co/guide/en/elasticsearch/reference/current/trim-processor.html +unfreeze-index-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/unfreeze-index-api.html update-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-data-frame-analytics update-desired-nodes,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster update-license,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post From f244bb6f92bdc1c09dbf16dfdae7d54177c76a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 24 Mar 2025 15:28:23 +0100 Subject: [PATCH 3/3] Make contrib. --- output/schema/schema-serverless.json | 16 ++++---- output/schema/schema.json | 60 ++++++++++++++-------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 0114954f8f..2448a062f9 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -4676,7 +4676,7 @@ }, "description": "Perform a chat completion task through the Elastic Inference Service (EIS).\n\nPerform a chat completion inference task with the `elastic` service.", "docId": "inference-api-post-eis-chat-completion", - "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-post-eis-chat-completion", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/post-inference-api.html", "name": "inference.post_eis_chat_completion", "privileges": { "cluster": [ @@ -7714,7 +7714,7 @@ "description": "Update a data frame analytics job.", "docId": "update-dfanalytics", "docTag": "ml data frame", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-dfanalytics.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-data-frame-analytics", "name": "ml.update_data_frame_analytics", "privileges": { "cluster": [ @@ -7901,7 +7901,7 @@ "description": "Update a trained model deployment.", "docId": "update-trained-model-deployment", "docTag": "ml trained model", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-trained-model-deployment.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-trained-model-deployment", "name": "ml.update_trained_model_deployment", "privileges": { "cluster": [ @@ -10716,7 +10716,7 @@ }, "description": "Update a transform.\nUpdates certain properties of a transform.\n\nAll updated properties except `description` do not take effect until after the transform starts the next checkpoint,\nthus there is data consistency in each checkpoint. To use this API, you must have `read` and `view_index_metadata`\nprivileges for the source indices. You must also have `index` and `read` privileges for the destination index. When\nElasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the\ntime of update and runs with those privileges.", "docId": "update-transform", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-transform.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-update-transform", "name": "transform.update_transform", "privileges": { "cluster": [ @@ -122271,7 +122271,7 @@ { "description": "Trims whitespace from a field.\nIf the field is an array of strings, all members of the array will be trimmed.\nThis only works on leading and trailing whitespace.", "docId": "trim-processor", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/trim-processor.html", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/trim-processor.html", "name": "trim", "required": false, "type": { @@ -122285,7 +122285,7 @@ { "description": "Converts a string to its uppercase equivalent.\nIf the field is an array of strings, all members of the array will be converted.", "docId": "uppercase-processor", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/uppercase-processor.html", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/uppercase-processor.html", "name": "uppercase", "required": false, "type": { @@ -122299,7 +122299,7 @@ { "description": "URL-decodes a string.\nIf the field is an array of strings, all members of the array will be decoded.", "docId": "urldecode-processor", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/urldecode-processor.html", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/urldecode-processor.html", "name": "urldecode", "required": false, "type": { @@ -122326,7 +122326,7 @@ { "description": "The `user_agent` processor extracts details from the user agent string a browser sends with its web requests.\nThis processor adds this information by default under the `user_agent` field.", "docId": "user-agent-processor", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/user-agent-processor.html", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/user-agent-processor.html", "name": "user_agent", "required": false, "type": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 19fb9c9ddd..5107d6024c 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -2400,7 +2400,7 @@ }, "description": "Clear cluster voting config exclusions.\nRemove master-eligible nodes from the voting configuration exclusion list.", "docId": "voting-config-exclusions", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/voting-config-exclusions.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions", "extDocId": "add-nodes", "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/add-elasticsearch-nodes.html", "name": "cluster.delete_voting_config_exclusions", @@ -2684,7 +2684,7 @@ }, "description": "Update voting configuration exclusions.\nUpdate the cluster voting config exclusions by node IDs or node names.\nBy default, if there are more than three master-eligible nodes in the cluster and you remove fewer than half of the master-eligible nodes in the cluster at once, the voting configuration automatically shrinks.\nIf you want to shrink the voting configuration to contain fewer than three nodes or to remove half or more of the master-eligible nodes in the cluster at once, use this API to remove departing nodes from the voting configuration manually.\nThe API adds an entry for each specified node to the cluster’s voting configuration exclusions list.\nIt then waits until the cluster has reconfigured its voting configuration to exclude the specified nodes.\n\nClusters should have no voting configuration exclusions in normal operation.\nOnce the excluded nodes have stopped, clear the voting configuration exclusions with `DELETE /_cluster/voting_config_exclusions`.\nThis API waits for the nodes to be fully removed from the cluster before it returns.\nIf your cluster has voting configuration exclusions for nodes that you no longer intend to remove, use `DELETE /_cluster/voting_config_exclusions?wait_for_removal=false` to clear the voting configuration exclusions without waiting for the nodes to leave the cluster.\n\nA response to `POST /_cluster/voting_config_exclusions` with an HTTP status code of 200 OK guarantees that the node has been removed from the voting configuration and will not be reinstated until the voting configuration exclusions are cleared by calling `DELETE /_cluster/voting_config_exclusions`.\nIf the call to `POST /_cluster/voting_config_exclusions` fails or returns a response with an HTTP status code other than 200 OK then the node may not have been removed from the voting configuration.\nIn that case, you may safely retry the call.\n\nNOTE: Voting exclusions are required only when you remove at least half of the master-eligible nodes from a cluster in a short time period.\nThey are not required when removing master-ineligible nodes or when removing fewer than half of the master-eligible nodes.", "docId": "voting-config-exclusions", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/voting-config-exclusions.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions", "extDocId": "add-nodes", "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/add-elasticsearch-nodes.html", "name": "cluster.post_voting_config_exclusions", @@ -9270,7 +9270,7 @@ }, "description": "Perform a chat completion task through the Elastic Inference Service (EIS).\n\nPerform a chat completion inference task with the `elastic` service.", "docId": "inference-api-post-eis-chat-completion", - "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-post-eis-chat-completion", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/post-inference-api.html", "name": "inference.post_eis_chat_completion", "privileges": { "cluster": [ @@ -10504,7 +10504,7 @@ }, "description": "Update the license.\n\nYou can update your license at runtime without shutting down your nodes.\nLicense updates take effect immediately.\nIf the license you are installing does not support all of the features that were available with your previous license, however, you are notified in the response.\nYou must then re-submit the API request with the acknowledge parameter set to true.\n\nNOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license.\nIf the operator privileges feature is enabled, only operator users can use this API.", "docId": "update-license", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-license.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post", "name": "license.post", "privileges": { "cluster": [ @@ -13892,7 +13892,7 @@ "description": "Update a data frame analytics job.", "docId": "update-dfanalytics", "docTag": "ml data frame", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-dfanalytics.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-data-frame-analytics", "name": "ml.update_data_frame_analytics", "privileges": { "cluster": [ @@ -14124,7 +14124,7 @@ "description": "Update a trained model deployment.", "docId": "update-trained-model-deployment", "docTag": "ml trained model", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-trained-model-deployment.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-trained-model-deployment", "name": "ml.update_trained_model_deployment", "privileges": { "cluster": [ @@ -18559,7 +18559,7 @@ "docId": "security-api-has-privileges-profile", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-api-has-privileges-user-profile.html", "extDocId": "user-profile", - "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/user-profile.html", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/user-profile.html", "name": "security.has_privileges_user_profile", "privileges": { "cluster": [ @@ -20646,7 +20646,7 @@ "docId": "snapshot-repo-verify", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/verify-snapshot-repo-api.html", "extDocId": "verify-repository", - "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/snapshots-register-repository.html#snapshots-repository-verification", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html#snapshots-repository-verification", "name": "snapshot.verify_repository", "privileges": { "cluster": [ @@ -22098,7 +22098,7 @@ }, "description": "Update a transform.\nUpdates certain properties of a transform.\n\nAll updated properties except `description` do not take effect until after the transform starts the next checkpoint,\nthus there is data consistency in each checkpoint. To use this API, you must have `read` and `view_index_metadata`\nprivileges for the source indices. You must also have `index` and `read` privileges for the destination index. When\nElasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the\ntime of update and runs with those privileges.", "docId": "update-transform", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-transform.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-update-transform", "name": "transform.update_transform", "privileges": { "cluster": [ @@ -22147,7 +22147,7 @@ }, "description": "Upgrade all transforms.\n\nTransforms are compatible across minor versions and between supported major versions.\nHowever, over time, the format of transform configuration information may change.\nThis API identifies transforms that have a legacy configuration format and upgrades them to the latest version.\nIt also cleans up the internal data structures that store the transform state and checkpoints.\nThe upgrade does not affect the source and destination indices.\nThe upgrade also does not affect the roles that transforms use when Elasticsearch security features are enabled; the role used to read source data and write to the destination index remains unchanged.\n\nIf a transform upgrade step fails, the upgrade stops and an error is returned about the underlying issue.\nResolve the issue then re-run the process again.\nA summary is returned when the upgrade is finished.\n\nTo ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster.\nYou may want to perform a recent cluster backup prior to the upgrade.", "docId": "upgrade-transforms", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/upgrade-transforms.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-upgrade-transforms", "name": "transform.upgrade_transforms", "privileges": { "cluster": [ @@ -22313,7 +22313,7 @@ }, "description": "Acknowledge a watch.\nAcknowledging a watch enables you to manually throttle the execution of the watch's actions.\n\nThe acknowledgement state of an action is stored in the `status.actions..ack.state` structure.\n\nIMPORTANT: If the specified watch is currently being executed, this API will return an error\nThe reason for this behavior is to prevent overwriting the watch status from a watch execution.\n\nAcknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`.\nThis happens when the condition of the watch is not met (the condition evaluates to false).", "docId": "watcher-api-ack-watch", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-ack-watch.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch", "name": "watcher.ack_watch", "privileges": { "cluster": [ @@ -22357,9 +22357,9 @@ }, "description": "Activate a watch.\nA watch can be either active or inactive.", "docId": "watcher-api-activate-watch", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-activate-watch.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-activate-watch", "extDocId": "watcher-works", - "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/how-watcher-works.html", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/how-watcher-works.html", "name": "watcher.activate_watch", "privileges": { "cluster": [ @@ -22396,9 +22396,9 @@ }, "description": "Deactivate a watch.\nA watch can be either active or inactive.", "docId": "watcher-api-deactivate-watch", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-deactivate-watch.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-deactivate-watch", "extDocId": "watcher-works", - "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/how-watcher-works.html", + "extDocUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/how-watcher-works.html", "name": "watcher.deactivate_watch", "privileges": { "cluster": [ @@ -22435,7 +22435,7 @@ }, "description": "Delete a watch.\nWhen the watch is removed, the document representing the watch in the `.watches` index is gone and it will never be run again.\n\nDeleting a watch does not delete any watch execution records related to this watch from the watch history.\n\nIMPORTANT: Deleting a watch must be done by using only this API.\nDo not delete the watch directly from the `.watches` index using the Elasticsearch delete document API\nWhen Elasticsearch security features are enabled, make sure no write privileges are granted to anyone for the `.watches` index.", "docId": "watcher-api-delete-watch", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-delete-watch.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-delete-watch", "name": "watcher.delete_watch", "privileges": { "cluster": [ @@ -22471,7 +22471,7 @@ }, "description": "Run a watch.\nThis API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes.\n\nFor testing and debugging purposes, you also have fine-grained control on how the watch runs.\nYou can run the watch without running all of its actions or alternatively by simulating them.\nYou can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after it runs.\n\nYou can use the run watch API to run watches that are not yet registered by specifying the watch definition inline.\nThis serves as great tool for testing and debugging your watches prior to adding them to Watcher.\n\nWhen Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches.\nIf your user is allowed to read index `a`, but not index `b`, then the exact same set of rules will apply during execution of a watch.\n\nWhen using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.", "docId": "watcher-api-execute-watch", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-execute-watch.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-execute-watch", "name": "watcher.execute_watch", "privileges": { "cluster": [ @@ -22519,7 +22519,7 @@ }, "description": "Get Watcher index settings.\nGet settings for the Watcher internal index (`.watches`).\nOnly a subset of settings are shown, for example `index.auto_expand_replicas` and `index.number_of_replicas`.", "docId": "watcher-api-get-settings", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-get-settings.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-settings", "name": "watcher.get_settings", "request": { "name": "Request", @@ -22554,7 +22554,7 @@ }, "description": "Get a watch.", "docId": "watcher-api-get-watch", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-get-watch.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-watch", "name": "watcher.get_watch", "privileges": { "cluster": [ @@ -22590,7 +22590,7 @@ }, "description": "Create or update a watch.\nWhen a watch is registered, a new document that represents the watch is added to the `.watches` index and its trigger is immediately registered with the relevant trigger engine.\nTypically for the `schedule` trigger, the scheduler is the trigger engine.\n\nIMPORTANT: You must use Kibana or this API to create a watch.\nDo not add a watch directly to the `.watches` index by using the Elasticsearch index API.\nIf Elasticsearch security features are enabled, do not give users write privileges on the `.watches` index.\n\nWhen you add a watch you can also define its initial active state by setting the *active* parameter.\n\nWhen Elasticsearch security features are enabled, your watch can index or search only on indices for which the user that stored the watch has privileges.\nIf the user is able to read index `a`, but not index `b`, the same will apply when the watch runs.", "docId": "watcher-api-put-watch", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-put-watch.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch", "name": "watcher.put_watch", "privileges": { "cluster": [ @@ -22631,7 +22631,7 @@ }, "description": "Query watches.\nGet all registered watches in a paginated manner and optionally filter watches by a query.\n\nNote that only the `_id` and `metadata.*` fields are queryable or sortable.", "docId": "watcher-api-query-watches", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-query-watches.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-query-watches", "name": "watcher.query_watches", "privileges": { "cluster": [ @@ -22671,7 +22671,7 @@ }, "description": "Start the watch service.\nStart the Watcher service if it is not already running.", "docId": "watcher-api-start", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-start.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-start", "name": "watcher.start", "privileges": { "cluster": [ @@ -22708,7 +22708,7 @@ }, "description": "Get Watcher statistics.\nThis API always returns basic metrics.\nYou retrieve more metrics by using the metric parameter.", "docId": "watcher-api-stats", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-stats.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stats", "name": "watcher.stats", "privileges": { "cluster": [ @@ -22750,7 +22750,7 @@ }, "description": "Stop the watch service.\nStop the Watcher service if it is running.", "docId": "watcher-api-stop", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-stop.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stop", "name": "watcher.stop", "privileges": { "cluster": [ @@ -22787,7 +22787,7 @@ }, "description": "Update Watcher index settings.\nUpdate settings for the Watcher internal index (`.watches`).\nOnly a subset of settings can be modified.\nThis includes `index.auto_expand_replicas` and `index.number_of_replicas`.", "docId": "watcher-api-update-settings", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-update-settings.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-update-settings", "name": "watcher.update_settings", "privileges": { "cluster": [ @@ -22870,7 +22870,7 @@ }, "description": "Get usage information.\nGet information about the features that are currently enabled and available under the current license.\nThe API also provides some usage statistics.", "docId": "usage-api", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/usage-api.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-xpack", "name": "xpack.usage", "privileges": { "cluster": [ @@ -155790,7 +155790,7 @@ { "description": "Trims whitespace from a field.\nIf the field is an array of strings, all members of the array will be trimmed.\nThis only works on leading and trailing whitespace.", "docId": "trim-processor", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/trim-processor.html", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/trim-processor.html", "name": "trim", "required": false, "type": { @@ -155804,7 +155804,7 @@ { "description": "Converts a string to its uppercase equivalent.\nIf the field is an array of strings, all members of the array will be converted.", "docId": "uppercase-processor", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/uppercase-processor.html", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/uppercase-processor.html", "name": "uppercase", "required": false, "type": { @@ -155818,7 +155818,7 @@ { "description": "URL-decodes a string.\nIf the field is an array of strings, all members of the array will be decoded.", "docId": "urldecode-processor", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/urldecode-processor.html", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/urldecode-processor.html", "name": "urldecode", "required": false, "type": { @@ -155845,7 +155845,7 @@ { "description": "The `user_agent` processor extracts details from the user agent string a browser sends with its web requests.\nThis processor adds this information by default under the `user_agent` field.", "docId": "user-agent-processor", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/user-agent-processor.html", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/user-agent-processor.html", "name": "user_agent", "required": false, "type": {