-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
bug: response header wrong for non streamed responses (no chunks) #2560
Comments
Great find! @Propheticus |
hi @Propheticus, the issue was resolved in our nightlybuild, would you mind retrying it? thank you |
@Van-QA Will do as soon as I get Avast to stop sandboxing and blocking the installer. |
That works! Also the JSON is formatted with newlines and indents now. HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-cache
Connection: keep-alive
Access-Control-Allow-Origin: *
Date: Tue, 09 Apr 2024 07:46:50 GMT
Transfer-Encoding: chunked
{
"choices":[
{
"finish_reason":null,
"index":0,
"message":{
"content":" Positive.",
"role":"assistant"
}
}
],
"created":1712648810,
"id":"pfSUz0sCcSG0jTqmQdlg",
"model":"_",
"object":"chat.completion",
"system_fingerprint":"_",
"usage":{
"completion_tokens":3,
"prompt_tokens":59,
"total_tokens":62
}
} |
2 remarks:
|
When calling the /chat/completions API endpoint without
"stream": true
set, the response is indeed a single JSON object of type "chat.completion" and not a streaming of multiple server event lines starting with "data: " followed by objects of type "chat.completion.chunk".So instead of
We get
However, the response header still says:
I would expect a content-type of "application/json" and not "text/event-stream". Also the transfer-encoding: chunked is false.
The text was updated successfully, but these errors were encountered: