Skip to content

Commit c7e230e

Browse files
committed
[DOCS] Documents dimensions param for openai service of Inference API.
1 parent 655090b commit c7e230e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/reference/inference/service-openai.asciidoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ https://platform.openai.com/api-keys[API keys section].
7676
include::inference-shared.asciidoc[tag=api-key-admonition]
7777
--
7878

79+
`dimensions`:::
80+
(Optional, integer)
81+
The number of dimensions the resulting output embeddings should have.
82+
Only supported in `text-embedding-3` and later models.
83+
7984
`model_id`:::
8085
(Required, string)
8186
The name of the model to use for the {infer} task.
@@ -134,8 +139,7 @@ Specifies the user issuing the request, which can be used for abuse detection.
134139
[[inference-example-openai]]
135140
==== OpenAI service example
136141

137-
The following example shows how to create an {infer} endpoint called
138-
`openai-embeddings` to perform a `text_embedding` task type.
142+
The following example shows how to create an {infer} endpoint called `openai-embeddings` to perform a `text_embedding` task type.
139143

140144
[source,console]
141145
------------------------------------------------------------
@@ -144,14 +148,14 @@ PUT _inference/text_embedding/openai-embeddings
144148
"service": "openai",
145149
"service_settings": {
146150
"api_key": "<api_key>",
147-
"model_id": "text-embedding-ada-002"
151+
"model_id": "text-embedding-3-small",
152+
"dimensions": 128
148153
}
149154
}
150155
------------------------------------------------------------
151156
// TEST[skip:TBD]
152157

153-
The next example shows how to create an {infer} endpoint called
154-
`openai-completion` to perform a `completion` task type.
158+
The next example shows how to create an {infer} endpoint called `openai-completion` to perform a `completion` task type.
155159

156160
[source,console]
157161
------------------------------------------------------------

0 commit comments

Comments
 (0)