diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 4c8ce93d25..9ade9c2791 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -7551,7 +7551,7 @@ } } }, - "/_inference/{task_type}/{model_id}": { + "/_inference/{inference_id}": { "get": { "tags": [ "inference.get_model" @@ -7564,49 +7564,107 @@ "operationId": "inference-get-model", "parameters": [ { - "in": "path", - "name": "task_type", - "description": "The model task type", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/inference._types:TaskType" - }, - "style": "simple" + "$ref": "#/components/parameters/inference.get_model#inference_id" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/inference.get_model#200" + } + } + }, + "put": { + "tags": [ + "inference.put_model" + ], + "summary": "Configure a model for use in the Inference API", + "description": "Configure a model for use in the Inference API", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html" + }, + "operationId": "inference-put-model", + "parameters": [ + { + "$ref": "#/components/parameters/inference.put_model#inference_id" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/inference.put_model" + }, + "responses": { + "200": { + "$ref": "#/components/responses/inference.put_model#200" + } + } + }, + "post": { + "tags": [ + "inference.inference" + ], + "summary": "Perform inference on a model", + "description": "Perform inference on a model", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html" + }, + "operationId": "inference-inference", + "parameters": [ + { + "$ref": "#/components/parameters/inference.inference#inference_id" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/inference.inference" + }, + "responses": { + "200": { + "$ref": "#/components/responses/inference.inference#200" + } + } + }, + "delete": { + "tags": [ + "inference.delete_model" + ], + "summary": "Delete model in the Inference API", + "description": "Delete model in the Inference API", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-inference-api.html" + }, + "operationId": "inference-delete-model", + "parameters": [ + { + "$ref": "#/components/parameters/inference.delete_model#inference_id" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/inference.delete_model#200" + } + } + } + }, + "/_inference/{task_type}/{inference_id}": { + "get": { + "tags": [ + "inference.get_model" + ], + "summary": "Get a model in the Inference API", + "description": "Get a model in the Inference API", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html" + }, + "operationId": "inference-get-model-1", + "parameters": [ + { + "$ref": "#/components/parameters/inference.get_model#task_type" }, { - "in": "path", - "name": "model_id", - "description": "The unique identifier of the inference model.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:Id" - }, - "style": "simple" + "$ref": "#/components/parameters/inference.get_model#inference_id" } ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/components/schemas/inference._types:ModelConfigContainer" - } - } - }, - "required": [ - "models" - ] - } - } - } + "$ref": "#/components/responses/inference.get_model#200" } } }, @@ -7619,50 +7677,21 @@ "externalDocs": { "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html" }, - "operationId": "inference-put-model", + "operationId": "inference-put-model-1", "parameters": [ { - "in": "path", - "name": "task_type", - "description": "The model task type", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/inference._types:TaskType" - }, - "style": "simple" + "$ref": "#/components/parameters/inference.put_model#task_type" }, { - "in": "path", - "name": "model_id", - "description": "The unique identifier of the inference model.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:Id" - }, - "style": "simple" + "$ref": "#/components/parameters/inference.put_model#inference_id" } ], "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types:ModelConfig" - } - } - } + "$ref": "#/components/requestBodies/inference.put_model" }, "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types:ModelConfigContainer" - } - } - } + "$ref": "#/components/responses/inference.put_model#200" } } }, @@ -7675,72 +7704,21 @@ "externalDocs": { "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html" }, - "operationId": "inference-inference", + "operationId": "inference-inference-1", "parameters": [ { - "in": "path", - "name": "task_type", - "description": "The model task type", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/inference._types:TaskType" - }, - "style": "simple" + "$ref": "#/components/parameters/inference.inference#task_type" }, { - "in": "path", - "name": "model_id", - "description": "The unique identifier of the inference model.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:Id" - }, - "style": "simple" + "$ref": "#/components/parameters/inference.inference#inference_id" } ], "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "input": { - "description": "Text input to the model.\nEither a string or an array of strings.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "task_settings": { - "$ref": "#/components/schemas/inference._types:TaskSettings" - } - }, - "required": [ - "input" - ] - } - } - } + "$ref": "#/components/requestBodies/inference.inference" }, "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types:InferenceResult" - } - } - } + "$ref": "#/components/responses/inference.inference#200" } } }, @@ -7753,41 +7731,18 @@ "externalDocs": { "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-inference-api.html" }, - "operationId": "inference-delete-model", + "operationId": "inference-delete-model-1", "parameters": [ { - "in": "path", - "name": "task_type", - "description": "The model task type", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/inference._types:TaskType" - }, - "style": "simple" + "$ref": "#/components/parameters/inference.delete_model#task_type" }, { - "in": "path", - "name": "model_id", - "description": "The unique identifier of the inference model.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:Id" - }, - "style": "simple" + "$ref": "#/components/parameters/inference.delete_model#inference_id" } ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types:AcknowledgedResponseBase" - } - } - } + "$ref": "#/components/responses/inference.delete_model#200" } } } @@ -19555,6 +19510,57 @@ } } }, + "inference.delete_model#200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types:AcknowledgedResponseBase" + } + } + } + }, + "inference.get_model#200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "models": { + "type": "array", + "items": { + "$ref": "#/components/schemas/inference._types:ModelConfigContainer" + } + } + }, + "required": [ + "models" + ] + } + } + } + }, + "inference.inference#200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types:InferenceResult" + } + } + } + }, + "inference.put_model#200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types:ModelConfigContainer" + } + } + } + }, "ingest.get_pipeline#200": { "description": "", "content": { @@ -23331,6 +23337,94 @@ }, "style": "form" }, + "inference.delete_model#task_type": { + "in": "path", + "name": "task_type", + "description": "The task type", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types:TaskType" + }, + "style": "simple" + }, + "inference.delete_model#inference_id": { + "in": "path", + "name": "inference_id", + "description": "The inference Id", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + }, + "inference.get_model#task_type": { + "in": "path", + "name": "task_type", + "description": "The task type", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types:TaskType" + }, + "style": "simple" + }, + "inference.get_model#inference_id": { + "in": "path", + "name": "inference_id", + "description": "The inference Id", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + }, + "inference.inference#task_type": { + "in": "path", + "name": "task_type", + "description": "The task type", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types:TaskType" + }, + "style": "simple" + }, + "inference.inference#inference_id": { + "in": "path", + "name": "inference_id", + "description": "The inference Id", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + }, + "inference.put_model#task_type": { + "in": "path", + "name": "task_type", + "description": "The task type", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/inference._types:TaskType" + }, + "style": "simple" + }, + "inference.put_model#inference_id": { + "in": "path", + "name": "inference_id", + "description": "The inference Id", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + }, "ingest.get_pipeline#id": { "in": "path", "name": "id", @@ -26226,6 +26320,46 @@ } } }, + "inference.inference": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "input": { + "description": "Text input to the model.\nEither a string or an array of strings.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "task_settings": { + "$ref": "#/components/schemas/inference._types:TaskSettings" + } + }, + "required": [ + "input" + ] + } + } + } + }, + "inference.put_model": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inference._types:ModelConfig" + } + } + } + }, "ingest.simulate": { "content": { "application/json": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 0925fc15e7..f07786440b 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -7591,7 +7591,13 @@ "methods": [ "DELETE" ], - "path": "/_inference/{task_type}/{model_id}" + "path": "/_inference/{inference_id}" + }, + { + "methods": [ + "DELETE" + ], + "path": "/_inference/{task_type}/{inference_id}" } ], "visibility": "public" @@ -7630,7 +7636,13 @@ "methods": [ "GET" ], - "path": "/_inference/{task_type}/{model_id}" + "path": "/_inference/{inference_id}" + }, + { + "methods": [ + "GET" + ], + "path": "/_inference/{task_type}/{inference_id}" } ], "visibility": "public" @@ -7655,6 +7667,9 @@ "namespace": "inference.inference" }, "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], "response": { "name": "Response", "namespace": "inference.inference" @@ -7669,7 +7684,13 @@ "methods": [ "POST" ], - "path": "/_inference/{task_type}/{model_id}" + "path": "/_inference/{inference_id}" + }, + { + "methods": [ + "POST" + ], + "path": "/_inference/{task_type}/{inference_id}" } ], "visibility": "public" @@ -7694,6 +7715,9 @@ "namespace": "inference.put_model" }, "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], "response": { "name": "Response", "namespace": "inference.put_model" @@ -7708,7 +7732,13 @@ "methods": [ "PUT" ], - "path": "/_inference/{task_type}/{model_id}" + "path": "/_inference/{inference_id}" + }, + { + "methods": [ + "PUT" + ], + "path": "/_inference/{task_type}/{inference_id}" } ], "visibility": "public" @@ -128484,9 +128514,9 @@ }, "path": [ { - "description": "The model task type", + "description": "The task type", "name": "task_type", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -128496,8 +128526,8 @@ } }, { - "description": "The unique identifier of the inference model.", - "name": "model_id", + "description": "The inference Id", + "name": "inference_id", "required": true, "type": { "kind": "instance_of", @@ -128550,9 +128580,9 @@ }, "path": [ { - "description": "The model task type", + "description": "The task type", "name": "task_type", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -128562,8 +128592,8 @@ } }, { - "description": "The unique identifier of the inference model.", - "name": "model_id", + "description": "The inference Id", + "name": "inference_id", "required": true, "type": { "kind": "instance_of", @@ -128666,9 +128696,9 @@ }, "path": [ { - "description": "The model task type", + "description": "The task type", "name": "task_type", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -128678,8 +128708,8 @@ } }, { - "description": "The unique identifier of the inference model.", - "name": "model_id", + "description": "The inference Id", + "name": "inference_id", "required": true, "type": { "kind": "instance_of", @@ -128740,9 +128770,9 @@ }, "path": [ { - "description": "The model task type", + "description": "The task type", "name": "task_type", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -128752,8 +128782,8 @@ } }, { - "description": "The unique identifier of the inference model.", - "name": "model_id", + "description": "The inference Id", + "name": "inference_id", "required": true, "type": { "kind": "instance_of", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index b029395df2..889dff57d9 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11534,15 +11534,15 @@ export interface InferenceTextEmbeddingResult { } export interface InferenceDeleteModelRequest extends RequestBase { - task_type: InferenceTaskType - model_id: Id + task_type?: InferenceTaskType + inference_id: Id } export type InferenceDeleteModelResponse = AcknowledgedResponseBase export interface InferenceGetModelRequest extends RequestBase { - task_type: InferenceTaskType - model_id: Id + task_type?: InferenceTaskType + inference_id: Id } export interface InferenceGetModelResponse { @@ -11550,8 +11550,8 @@ export interface InferenceGetModelResponse { } export interface InferenceInferenceRequest extends RequestBase { - task_type: InferenceTaskType - model_id: Id + task_type?: InferenceTaskType + inference_id: Id body?: { input: string | string[] task_settings?: InferenceTaskSettings @@ -11561,8 +11561,8 @@ export interface InferenceInferenceRequest extends RequestBase { export type InferenceInferenceResponse = InferenceInferenceResult export interface InferencePutModelRequest extends RequestBase { - task_type: InferenceTaskType - model_id: Id + task_type?: InferenceTaskType + inference_id: Id body?: InferenceModelConfig }