mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
Merge pull request #5060 from cheahjs/fix/missing-chat-completion-response-headers
fix: return proxied response headers during chat completion
This commit is contained in:
commit
a8c15e1b54
1 changed files with 4 additions and 1 deletions
|
|
@ -628,7 +628,10 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
|
|||
async for data in original_generator:
|
||||
yield data
|
||||
|
||||
return StreamingResponse(stream_wrapper(response.body_iterator, data_items))
|
||||
return StreamingResponse(
|
||||
stream_wrapper(response.body_iterator, data_items),
|
||||
headers=dict(response.headers),
|
||||
)
|
||||
|
||||
async def _receive(self, body: bytes):
|
||||
return {"type": "http.request", "body": body, "more_body": False}
|
||||
|
|
|
|||
Loading…
Reference in a new issue