Skip to content

Commit c2e75e1

Browse files
authored
Add the input_type param to the Perform text embedding inference API (#5274)
1 parent 995ce16 commit c2e75e1

File tree

6 files changed

+39
-7
lines changed

6 files changed

+39
-7
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 14 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/inference/text_embedding/TextEmbeddingRequest.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ export interface Request extends RequestBase {
5555
* Either a string or an array of strings.
5656
*/
5757
input: string | Array<string>
58+
/**
59+
* The input data type for the text embedding model. Possible values include:
60+
* * `SEARCH`
61+
* * `INGEST`
62+
* * `CLASSIFICATION`
63+
* * `CLUSTERING`
64+
* Not all services support all values. Unsupported values will trigger a validation exception.
65+
* Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.
66+
*
67+
* > info
68+
* > 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`.
69+
*/
70+
input_type?: string
5871
/**
5972
* Optional task settings
6073
*/

specification/inference/text_embedding/examples/request/TextEmbeddingRequestExample1.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@ method_request: 'POST _inference/text_embedding/my-cohere-endpoint'
77
value: |-
88
{
99
"input": "The sky above the port was the color of television tuned to a dead channel.",
10-
"task_settings": {
11-
"input_type": "ingest"
12-
}
10+
"input_type": "ingest"
1311
}

0 commit comments

Comments
 (0)