paola1 commited on
Commit
a0095e0
·
verified ·
1 Parent(s): d259141

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -52,8 +52,8 @@ async def chat(request: ChatRequest):
52
  try:
53
  data = json.loads(line[len('data: '):])
54
  content = data.get("choices", [{}])[0].get("delta", {}).get("content", '')
55
- if content:
56
- yield f"{json.dumps({'response': content})}\n\n"
57
  except json.JSONDecodeError:
58
  continue
59
 
 
52
  try:
53
  data = json.loads(line[len('data: '):])
54
  content = data.get("choices", [{}])[0].get("delta", {}).get("content", '')
55
+ if content:
56
+ yield f"{json.dumps({'response': content})}\n\n"
57
  except json.JSONDecodeError:
58
  continue
59