Update app.py
Browse files
app.py
CHANGED
@@ -58,7 +58,7 @@ async def chat(request: ChatRequest):
|
|
58 |
if 'choices' in parsed_data and len(parsed_data['choices']) > 0:
|
59 |
content = parsed_data['choices'][0]['delta'].get('content', '')
|
60 |
if content:
|
61 |
-
yield content
|
62 |
except json.JSONDecodeError:
|
63 |
continue
|
64 |
|
|
|
58 |
if 'choices' in parsed_data and len(parsed_data['choices']) > 0:
|
59 |
content = parsed_data['choices'][0]['delta'].get('content', '')
|
60 |
if content:
|
61 |
+
yield f"{json.dumps({'response': content})}\n\n"
|
62 |
except json.JSONDecodeError:
|
63 |
continue
|
64 |
|