refactor(proxy_server.py): print statement showing how to add debug for logs

This commit is contained in:
Krrish Dholakia 2023-11-03 17:41:02 -07:00
parent 6c4816e214
commit 4e1885734a
8 changed files with 76 additions and 207 deletions

View file

@ -255,7 +255,7 @@ def completion(
## Some servers might return streaming responses even though stream was not set to true. (e.g. Baseten)
is_streamed = False
if response.__dict__['headers']["Content-Type"] == "text/event-stream":
if response.__dict__['headers'].get("Content-Type", "") == "text/event-stream":
is_streamed = True
# iterate over the complete streamed response, and return the final answer