diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 58d0f3857c..916f1211bf 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -23803,6 +23803,10 @@ } ] }, + "input_type": { + "description": "The input data type for the text embedding model. Possible values include:\n* `SEARCH`\n* `INGEST`\n* `CLASSIFICATION`\n* `CLUSTERING`\nNot all services support all values. Unsupported values will trigger a validation exception.\nAccepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.\n\n> info\n> The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`.", + "type": "string" + }, "task_settings": { "description": "Optional task settings", "allOf": [ @@ -23820,7 +23824,7 @@ "TextEmbeddingRequestExample1": { "summary": "Text embedding task", "description": "Run `POST _inference/text_embedding/my-cohere-endpoint` to perform text embedding on the example sentence using the Cohere integration,", - "value": "{\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"task_settings\": {\n \"input_type\": \"ingest\"\n }\n}" + "value": "{\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"input_type\": \"ingest\"\n}" } } } diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 4d2441d557..3334ff741b 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -14341,6 +14341,10 @@ } ] }, + "input_type": { + "description": "The input data type for the text embedding model. Possible values include:\n* `SEARCH`\n* `INGEST`\n* `CLASSIFICATION`\n* `CLUSTERING`\nNot all services support all values. Unsupported values will trigger a validation exception.\nAccepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.\n\n> info\n> The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`.", + "type": "string" + }, "task_settings": { "description": "Optional task settings", "allOf": [ @@ -14358,7 +14362,7 @@ "TextEmbeddingRequestExample1": { "summary": "Text embedding task", "description": "Run `POST _inference/text_embedding/my-cohere-endpoint` to perform text embedding on the example sentence using the Cohere integration,", - "value": "{\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"task_settings\": {\n \"input_type\": \"ingest\"\n }\n}" + "value": "{\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"input_type\": \"ingest\"\n}" } } } diff --git a/output/schema/schema.json b/output/schema/schema.json index f5c4618f82..c73da95bca 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -179197,6 +179197,18 @@ ] } }, + { + "description": "The input data type for the text embedding model. Possible values include:\n* `SEARCH`\n* `INGEST`\n* `CLASSIFICATION`\n* `CLUSTERING`\nNot all services support all values. Unsupported values will trigger a validation exception.\nAccepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.\n\n> info\n> The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`.", + "name": "input_type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, { "description": "Optional task settings", "name": "task_settings", @@ -179243,7 +179255,7 @@ "description": "Run `POST _inference/text_embedding/my-cohere-endpoint` to perform text embedding on the example sentence using the Cohere integration,", "method_request": "POST _inference/text_embedding/my-cohere-endpoint", "summary": "Text embedding task", - "value": "{\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"task_settings\": {\n \"input_type\": \"ingest\"\n }\n}" + "value": "{\n \"input\": \"The sky above the port was the color of television tuned to a dead channel.\",\n \"input_type\": \"ingest\"\n}" } }, "inherits": { @@ -179285,7 +179297,7 @@ } } ], - "specLocation": "inference/text_embedding/TextEmbeddingRequest.ts#L25-L63" + "specLocation": "inference/text_embedding/TextEmbeddingRequest.ts#L25-L76" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 4e1384d17e..bd4cd435ba 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -14708,6 +14708,7 @@ export interface InferenceTextEmbeddingRequest extends RequestBase { timeout?: Duration body?: { input: string | string[] + input_type?: string task_settings?: InferenceTaskSettings } } diff --git a/specification/inference/text_embedding/TextEmbeddingRequest.ts b/specification/inference/text_embedding/TextEmbeddingRequest.ts index 7d26edb597..48a48792c8 100644 --- a/specification/inference/text_embedding/TextEmbeddingRequest.ts +++ b/specification/inference/text_embedding/TextEmbeddingRequest.ts @@ -55,6 +55,19 @@ export interface Request extends RequestBase { * Either a string or an array of strings. */ input: string | Array + /** + * The input data type for the text embedding model. Possible values include: + * * `SEARCH` + * * `INGEST` + * * `CLASSIFICATION` + * * `CLUSTERING` + * Not all services support all values. Unsupported values will trigger a validation exception. + * Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info. + * + * > info + * > The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`. + */ + input_type?: string /** * Optional task settings */ diff --git a/specification/inference/text_embedding/examples/request/TextEmbeddingRequestExample1.yaml b/specification/inference/text_embedding/examples/request/TextEmbeddingRequestExample1.yaml index 6ad435dfd2..28f298a956 100644 --- a/specification/inference/text_embedding/examples/request/TextEmbeddingRequestExample1.yaml +++ b/specification/inference/text_embedding/examples/request/TextEmbeddingRequestExample1.yaml @@ -7,7 +7,5 @@ method_request: 'POST _inference/text_embedding/my-cohere-endpoint' value: |- { "input": "The sky above the port was the color of television tuned to a dead channel.", - "task_settings": { - "input_type": "ingest" - } + "input_type": "ingest" }