diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 0c9cf81ee7..bab3aee1eb 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -22870,6 +22870,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": [ @@ -22887,7 +22891,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 c176c2f7e2..a79a7cc75e 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -13973,6 +13973,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": [ @@ -13990,7 +13994,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 1491f2ea36..d7d145cf99 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -175219,6 +175219,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", @@ -175265,7 +175277,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": { @@ -175307,7 +175319,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 9b4920a361..763c335348 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -14529,6 +14529,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" }