mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-11-02 04:43:27 +08:00
Add data dictionary for API response processing (#4454)
Initialize data dictionary for response handling.
This commit is contained in:
@@ -118,6 +118,7 @@ async def async_request_eb_openai_chat_completions(
|
||||
most_recent_timestamp = st
|
||||
try:
|
||||
async with session.post(url=api_url, json=payload, headers=headers) as response:
|
||||
data = {}
|
||||
if response.status == 200:
|
||||
async for chunk_bytes in response.content:
|
||||
chunk_bytes = chunk_bytes.strip()
|
||||
|
||||
Reference in New Issue
Block a user