fix(proxy_server.py): return [DONE] end of stream chunk
This commit is contained in:
parent
7822a8d421
commit
bf4c4426e5
@ -913,6 +913,10 @@ async def async_data_generator(response, user_api_key_dict):
|
||||
yield f"data: {json.dumps(chunk.dict())}\n\n"
|
||||
except Exception as e:
|
||||
yield f"data: {str(e)}\n\n"
|
||||
|
||||
# Streaming is done, yield the [DONE] chunk
|
||||
done_message = "[DONE]"
|
||||
yield f"data: {done_message}\n\n"
|
||||
except Exception as e:
|
||||
yield f"data: {str(e)}\n\n"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user