Skip to content

Commit d50fa37

Browse files
committed
[8.14][DOCS] Documents dimensions param for openai service of Inference API.
1 parent 699b149 commit d50fa37

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

docs/reference/inference/put-inference.asciidoc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ creating the {infer} model, you cannot change the associated API key. If you
173173
want to use a different API key, delete the {infer} model and recreate it with
174174
the same name and the updated API key.
175175
176+
`dimensions`:::
177+
(Optional, integer)
178+
The number of dimensions the resulting output embeddings should have.
179+
Only supported in `text-embedding-3` and later models.
180+
If not set the OpenAI defined default for the model is used.
181+
176182
`model_id`:::
177183
(Required, string)
178184
The name of the model to use for the {infer} task. Refer to the
@@ -506,8 +512,8 @@ been
506512
[[inference-example-openai]]
507513
===== OpenAI service
508514

509-
The following example shows how to create an {infer} endpoint called
510-
`openai-embeddings` to perform a `text_embedding` task type.
515+
The following example shows how to create an {infer} endpoint called `openai-embeddings` to perform a `text_embedding` task type.
516+
The embeddings created by requests to this endpoint will have 128 dimensions.
511517

512518
[source,console]
513519
------------------------------------------------------------
@@ -516,7 +522,8 @@ PUT _inference/text_embedding/openai-embeddings
516522
"service": "openai",
517523
"service_settings": {
518524
"api_key": "<api_key>",
519-
"model_id": "text-embedding-ada-002"
525+
"model_id": "text-embedding-3-small",
526+
"dimensions": 128
520527
}
521528
}
522529
------------------------------------------------------------

0 commit comments

Comments
 (0)