From 44aba6ac1c59692b4bd5f4279356686522def140 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 7 Apr 2025 17:24:27 +0400 Subject: [PATCH] Remove EIS APIs (#4212) (cherry picked from commit c542836a5f1966c8f70f9018779f9934a81d2118) # Conflicts: # output/schema/schema-serverless.json # output/schema/schema.json # specification/inference/post_eis_chat_completion/PostEisChatCompletionResponse.ts --- output/openapi/elasticsearch-openapi.json | 193 ++------ .../elasticsearch-serverless-openapi.json | 167 +------ output/schema/schema-serverless.json | 444 +++++------------- output/schema/schema.json | 444 ++++++------------ output/typescript/types.ts | 41 +- .../PostEisChatCompletionRequest.ts | 48 -- .../PostEisChatCompletionResponse.ts | 24 - .../PostEisChatCompletionRequestExample.yaml | 17 - .../inference/put_eis/PutEisRequest.ts | 66 --- .../inference/put_eis/PutEisResponse.ts | 25 - .../example/request/PutEisRequestExample.yaml | 11 - 11 files changed, 335 insertions(+), 1145 deletions(-) delete mode 100644 specification/inference/post_eis_chat_completion/PostEisChatCompletionRequest.ts delete mode 100644 specification/inference/post_eis_chat_completion/PostEisChatCompletionResponse.ts delete mode 100644 specification/inference/post_eis_chat_completion/examples/PostEisChatCompletionRequestExample.yaml delete mode 100644 specification/inference/put_eis/PutEisRequest.ts delete mode 100644 specification/inference/put_eis/PutEisResponse.ts delete mode 100644 specification/inference/put_eis/example/request/PutEisRequestExample.yaml diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 270e03314e..4b09ce9553 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -17817,52 +17817,6 @@ "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": { - "$ref": "#/components/schemas/inference._types:RequestChatCompletion" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/_types:StreamResult" - } - } - } - } - }, - "x-state": "Added in 9.0.0" - } - }, "/_inference/{task_type}/{alibabacloud_inference_id}": { "put": { "tags": [ @@ -18383,74 +18337,6 @@ "x-state": "Added in 8.13.0" } }, - "/_inference/{task_type}/{eis_inference_id}": { - "put": { - "tags": [ - "inference" - ], - "summary": "Create an Elastic Inference Service (EIS) inference endpoint", - "description": "Create an inference endpoint to perform an inference task through the Elastic Inference Service (EIS).", - "operationId": "inference-put-eis", - "parameters": [ - { - "in": "path", - "name": "task_type", - "description": "The type of the inference task that the model will perform.\nNOTE: The `chat_completion` task type only supports streaming and only through the _stream API.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/inference._types:EisTaskType" - }, - "style": "simple" - }, - { - "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", - "properties": { - "service": { - "$ref": "#/components/schemas/inference._types:EisServiceType" - }, - "service_settings": { - "$ref": "#/components/schemas/inference._types:EisServiceSettings" - } - }, - "required": [ - "service", - "service_settings" - ] - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inference._types:InferenceEndpointInfo" - } - } - } - } - }, - "x-state": "Added in 8.12.0" - } - }, "/_inference/{task_type}/{elasticsearch_inference_id}": { "put": { "tags": [ @@ -69766,6 +69652,16 @@ "languid" ] }, + "cluster.health:WaitForNodes": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, "cluster.health:HealthResponseBody": { "type": "object", "properties": { @@ -69777,8 +69673,13 @@ "description": "The total number of active primary and replica shards.", "type": "number" }, + "active_shards_percent": { + "description": "The ratio of active shards in the cluster expressed as a string formatted percentage.", + "type": "string" + }, "active_shards_percent_as_number": { - "$ref": "#/components/schemas/_types:Percentage" + "description": "The ratio of active shards in the cluster expressed as a percentage.", + "type": "number" }, "cluster_name": { "$ref": "#/components/schemas/_types:Name" @@ -78812,33 +78713,6 @@ "START" ] }, - "inference._types:EisTaskType": { - "type": "string", - "enum": [ - "chat_completion" - ] - }, - "inference._types:EisServiceType": { - "type": "string", - "enum": [ - "elastic" - ] - }, - "inference._types:EisServiceSettings": { - "type": "object", - "properties": { - "model_id": { - "description": "The name of the model to use for the inference task.", - "type": "string" - }, - "rate_limit": { - "$ref": "#/components/schemas/inference._types:RateLimitSetting" - } - }, - "required": [ - "model_id" - ] - }, "inference._types:ElasticsearchTaskType": { "type": "string", "enum": [ @@ -80810,6 +80684,17 @@ }, "inference_config": { "$ref": "#/components/schemas/ingest._types:InferenceConfig" + }, + "input_output": { + "description": "Input fields for inference and output (destination) fields for the inference results.\nThis option is incompatible with the target_field and field_map options.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types:InputConfig" + } + }, + "ignore_missing": { + "description": "If true and any of the input fields defined in input_ouput are missing\nthen those missing fields are quietly ignored, otherwise a missing field causes a failure.\nOnly applies when using input_output configurations to explicitly list the input fields.", + "type": "boolean" } }, "required": [ @@ -80866,6 +80751,21 @@ } } }, + "ingest._types:InputConfig": { + "type": "object", + "properties": { + "input_field": { + "type": "string" + }, + "output_field": { + "type": "string" + } + }, + "required": [ + "input_field", + "output_field" + ] + }, "ingest._types:JoinProcessor": { "allOf": [ { @@ -106264,14 +106164,7 @@ "description": "The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and @@ -9330,7 +9331,7 @@ export interface ClusterHealthRequest extends RequestBase { timeout?: Duration wait_for_active_shards?: WaitForActiveShards wait_for_events?: WaitForEvents - wait_for_nodes?: string | integer + wait_for_nodes?: ClusterHealthWaitForNodes wait_for_no_initializing_shards?: boolean wait_for_no_relocating_shards?: boolean wait_for_status?: HealthStatus @@ -9348,6 +9349,8 @@ export interface ClusterHealthShardHealthStats { unassigned_primary_shards: integer } +export type ClusterHealthWaitForNodes = string | integer + export interface ClusterInfoRequest extends RequestBase { target: ClusterInfoTargets } @@ -13238,15 +13241,6 @@ export type InferenceDenseByteVector = byte[] export type InferenceDenseVector = float[] -export interface InferenceEisServiceSettings { - model_id: string - rate_limit?: InferenceRateLimitSetting -} - -export type InferenceEisServiceType = 'elastic' - -export type InferenceEisTaskType = 'chat_completion' - export interface InferenceElasticsearchServiceSettings { adaptive_allocations?: InferenceAdaptiveAllocations deployment_id?: string @@ -13521,13 +13515,6 @@ export interface InferenceGetResponse { endpoints: InferenceInferenceEndpointInfo[] } -export interface InferencePostEisChatCompletionRequest extends RequestBase { - eis_inference_id: Id - body?: InferenceRequestChatCompletion -} - -export type InferencePostEisChatCompletionResponse = StreamResult - export interface InferencePutRequest extends RequestBase { task_type?: InferenceTaskType inference_id: Id @@ -13614,17 +13601,6 @@ export interface InferencePutCohereRequest extends RequestBase { export type InferencePutCohereResponse = InferenceInferenceEndpointInfo -export interface InferencePutEisRequest extends RequestBase { - task_type: InferenceEisTaskType - eis_inference_id: Id - body?: { - service: InferenceEisServiceType - service_settings: InferenceEisServiceSettings - } -} - -export type InferencePutEisResponse = InferenceInferenceEndpointInfo - export interface InferencePutElasticsearchRequest extends RequestBase { task_type: InferenceElasticsearchTaskType elasticsearch_inference_id: Id @@ -14034,6 +14010,8 @@ export interface IngestInferenceProcessor extends IngestProcessorBase { target_field?: Field field_map?: Record inference_config?: IngestInferenceConfig + input_output?: IngestInputConfig[] + ignore_missing?: boolean } export interface IngestIngest { @@ -14042,6 +14020,11 @@ export interface IngestIngest { pipeline?: Name } +export interface IngestInputConfig { + input_field: string + output_field: string +} + export interface IngestIpLocationProcessor extends IngestProcessorBase { database_file?: string field: Field diff --git a/specification/inference/post_eis_chat_completion/PostEisChatCompletionRequest.ts b/specification/inference/post_eis_chat_completion/PostEisChatCompletionRequest.ts deleted file mode 100644 index 5141e37051..0000000000 --- a/specification/inference/post_eis_chat_completion/PostEisChatCompletionRequest.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 { RequestChatCompletion } from '@inference/_types/CommonTypes' -import { RequestBase } from '@_types/Base' -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 RequestBase { - urls: [ - { - path: '/_inference/chat_completion/{eis_inference_id}/_stream' - methods: ['POST'] - } - ] - path_parts: { - /** - * The unique identifier of the inference endpoint. - */ - eis_inference_id: Id - } - /** @codegen_name chat_completion_request */ - body: RequestChatCompletion -} diff --git a/specification/inference/post_eis_chat_completion/PostEisChatCompletionResponse.ts b/specification/inference/post_eis_chat_completion/PostEisChatCompletionResponse.ts deleted file mode 100644 index 74b823bf40..0000000000 --- a/specification/inference/post_eis_chat_completion/PostEisChatCompletionResponse.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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 deleted file mode 100644 index 575da1bfa6..0000000000 --- a/specification/inference/post_eis_chat_completion/examples/PostEisChatCompletionRequestExample.yaml +++ /dev/null @@ -1,17 +0,0 @@ -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 - } - } diff --git a/specification/inference/put_eis/PutEisRequest.ts b/specification/inference/put_eis/PutEisRequest.ts deleted file mode 100644 index 40c898a6d0..0000000000 --- a/specification/inference/put_eis/PutEisRequest.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 { - EisServiceSettings, - EisServiceType, - EisTaskType -} from '@inference/_types/CommonTypes' -import { RequestBase } from '@_types/Base' -import { Id } from '@_types/common' - -/** - * Create an Elastic Inference Service (EIS) inference endpoint. - * - * Create an inference endpoint to perform an inference task through the Elastic Inference Service (EIS). - * @rest_spec_name inference.put_eis - * @availability stack since=8.12.0 stability=stable visibility=public - * @availability serverless stability=stable visibility=public - * @cluster_privileges manage_inference - * @doc_id inference-api-put-eis - */ -export interface Request extends RequestBase { - urls: [ - { - path: '/_inference/{task_type}/{eis_inference_id}' - methods: ['PUT'] - } - ] - path_parts: { - /** - * The type of the inference task that the model will perform. - * NOTE: The `chat_completion` task type only supports streaming and only through the _stream API. - */ - task_type: EisTaskType - /** - * The unique identifier of the inference endpoint. - */ - eis_inference_id: Id - } - body: { - /** - * The type of service supported for the specified task type. In this case, `elastic`. - */ - service: EisServiceType - /** - * Settings used to install the inference model. These settings are specific to the `elastic` service. - */ - service_settings: EisServiceSettings - } -} diff --git a/specification/inference/put_eis/PutEisResponse.ts b/specification/inference/put_eis/PutEisResponse.ts deleted file mode 100644 index 581909e650..0000000000 --- a/specification/inference/put_eis/PutEisResponse.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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 { InferenceEndpointInfo } from '@inference/_types/Services' - -export class Response { - /** @codegen_name endpoint_info */ - body: InferenceEndpointInfo -} diff --git a/specification/inference/put_eis/example/request/PutEisRequestExample.yaml b/specification/inference/put_eis/example/request/PutEisRequestExample.yaml deleted file mode 100644 index 573bc66d22..0000000000 --- a/specification/inference/put_eis/example/request/PutEisRequestExample.yaml +++ /dev/null @@ -1,11 +0,0 @@ -summary: A chat completion task -description: Run `PUT _inference/chat_completion/chat-completion-endpoint` to create an inference endpoint to perform a chat completion task type. -# method_request: "PUT _inference/chat_completion/chat-completion-endpoint" -# type: "request" -value: |- - { - "service": "elastic", - "service_settings": { - "model_id": "rainbow-sprinkles" - } - }