'commit'
This commit is contained in:
@@ -169,7 +169,7 @@ async def chat(request: fastapi.Request):
|
||||
async for chunk in stream:
|
||||
if chunk.choices[0].delta.content:
|
||||
full_answer.append(chunk.choices[0].delta.content)
|
||||
yield f"data: {json.dumps({'reply': chunk.choices[0].delta.content}, ensure_ascii=False)}\n\n"
|
||||
yield f"data: {json.dumps({'reply': chunk.choices[0].delta.content.replace('$ ', '$').replace(' $', '$'), 'session_id': session_id}, ensure_ascii=False)}\n\n"
|
||||
|
||||
# 保存回答到ES和对话历史
|
||||
if full_answer:
|
||||
|
Reference in New Issue
Block a user