Skip to content

Fix references to _unified inference API #676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ The {{infer}} APIs enable you to use certain services, such as built-in {{ml}} m

## {{api-request-title}} [chat-completion-inference-api-request]

`POST /_inference/<inference_id>/_unified`
`POST /_inference/<inference_id>/_stream`

`POST /_inference/chat_completion/<inference_id>/_unified`
`POST /_inference/chat_completion/<inference_id>/_stream`


## {{api-prereq-title}} [chat-completion-inference-api-prereqs]
Expand All @@ -38,8 +38,8 @@ The {{infer}} APIs enable you to use certain services, such as built-in {{ml}} m

The chat completion {{infer}} API enables real-time responses for chat completion tasks by delivering answers incrementally, reducing response times during computation. It only works with the `chat_completion` task type for `openai` and `elastic` {{infer}} services.

::::{note}
* The `chat_completion` task type is only available within the _unified API and only supports streaming.
::::{note}
* The `chat_completion` task type is only available within the `_stream` API and only supports streaming.
* The Chat completion {{infer}} API and the Stream {{infer}} API differ in their response structure and capabilities. The Chat completion {{infer}} API provides more comprehensive customization options through more fields and function calling support. If you use the `openai` service or the `elastic` service, use the Chat completion {{infer}} API.

::::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Creates an {{infer}} endpoint to perform an {{infer}} task with the `elastic` se


::::{note}
The `chat_completion` task type only supports streaming and only through the `_unified` API.
The `chat_completion` task type only supports streaming and only through the `_stream` API.

For more information on how to use the `chat_completion` task type, please refer to the [chat completion documentation](/solutions/search/inference-api/chat-completion-inference-api.md).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Creates an {{infer}} endpoint to perform an {{infer}} task with the `openai` ser


::::{note}
The `chat_completion` task type only supports streaming and only through the `_unified` API.
The `chat_completion` task type only supports streaming and only through the `_stream` API.

For more information on how to use the `chat_completion` task type, please refer to the [chat completion documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/chat-completion-inference-api.html).

Expand Down
2 changes: 1 addition & 1 deletion solutions/search/semantic-search/cohere-es.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Rerank the results using the new {{infer}} endpoint.

```py
# Pass the query and the search results to the service
response = client.inference.inference(
response = client.inference.rerank(
inference_id="cohere_rerank",
body={
"query": query,
Expand Down