Skip to content

Commit

Permalink
[DOCS] Adjusts PUT inference API docs examples (#106604) (#106606)
Browse files Browse the repository at this point in the history
Co-authored-by: David Kyle <[email protected]>
  • Loading branch information
szabosteve and davidkyle authored Mar 21, 2024
1 parent 8b50e93 commit d7b3acc
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions docs/reference/inference/put-inference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ creating the {infer} model, you cannot change the associated API key. If you
want to use a different API key, delete the {infer} model and recreate it with
the same name and the updated API key.
`model_id`:::
(Optional, string)
The name of the model to use for the {infer} task. Refer to the
https://platform.openai.com/docs/guides/embeddings/what-are-embeddings[OpenAI documentation]
for the list of available text embedding models.
`organization_id`:::
(Optional, string)
The unique identifier of your organization. You can find the Organization ID in
Expand Down Expand Up @@ -215,13 +221,6 @@ Valid values are:
* `search`: use it for storing embeddings of search queries run against a
vector data base to find relevant documents.
`model`:::
(Optional, string)
For `openai` sevice only. The name of the model to use for the {infer} task. Refer
to the
https://platform.openai.com/docs/guides/embeddings/what-are-embeddings[OpenAI documentation]
for the list of available text embedding models.
`truncate`:::
(Optional, string)
For `cohere` service only. Specifies how the API handles inputs longer than the
Expand Down Expand Up @@ -256,7 +255,7 @@ PUT _inference/text_embedding/cohere-embeddings
"service": "cohere",
"service_settings": {
"api_key": "<api_key>",
"model": "embed-english-light-v3.0",
"model_id": "embed-english-light-v3.0",
"embedding_type": "byte"
}
}
Expand Down Expand Up @@ -304,8 +303,7 @@ PUT _inference/sparse_embedding/my-elser-model
"service_settings": {
"num_allocations": 1,
"num_threads": 1
},
"task_settings": {}
}
}
------------------------------------------------------------
// TEST[skip:TBD]
Expand Down Expand Up @@ -397,10 +395,8 @@ PUT _inference/text_embedding/openai_embeddings
{
"service": "openai",
"service_settings": {
"api_key": "<api_key>"
},
"task_settings": {
"model": "text-embedding-ada-002"
"api_key": "<api_key>",
"model_id": "text-embedding-ada-002"
}
}
------------------------------------------------------------
Expand Down

0 comments on commit d7b3acc

Please sign in to comment.