paola1 commited on
Commit
8d4b725
·
verified ·
1 Parent(s): 5220fc4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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