Skip to content

Commit 675a49f

Browse files
authored
[DOCS] Adds note about differences between chat completion and stream API (elastic#120636) (elastic#120710)
1 parent c38d438 commit 675a49f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/reference/inference/chat-completion-inference.asciidoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@ However, if you do not plan to use the {infer} APIs to use these models or if yo
3434
The chat completion {infer} API enables real-time responses for chat completion tasks by delivering answers incrementally, reducing response times during computation.
3535
It only works with the `chat_completion` task type for `openai` and `elastic` {infer} services.
3636

37+
3738
[NOTE]
3839
====
39-
The `chat_completion` task type is only available within the _unified API and only supports streaming.
40+
* The `chat_completion` task type is only available within the _unified API and only supports streaming.
41+
* The Chat completion {infer} API and the Stream {infer} API differ in their response structure and capabilities.
42+
The Chat completion {infer} API provides more comprehensive customization options through more fields and function calling support.
43+
If you use the `openai` service or the `elastic` service, use the Chat completion {infer} API.
4044
====
4145

4246
[discrete]

docs/reference/inference/stream-inference.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ However, if you do not plan to use the {infer} APIs to use these models or if yo
4040
The stream {infer} API enables real-time responses for completion tasks by delivering answers incrementally, reducing response times during computation.
4141
It only works with the `completion` and `chat_completion` task types.
4242

43+
The Chat completion {infer} API and the Stream {infer} API differ in their response structure and capabilities.
44+
The Chat completion {infer} API provides more comprehensive customization options through more fields and function calling support.
45+
If you use the `openai` service or the `elastic` service, use the Chat completion {infer} API.
46+
4347
[NOTE]
4448
====
4549
include::inference-shared.asciidoc[tag=chat-completion-docs]

0 commit comments

Comments
 (0)