mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 21:42:58 +00:00
fix: return proxied response headers during chat completion
This commit is contained in:
parent
08efabc696
commit
953beb369c
@ -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 New Issue
Block a user