报告空格保留
This commit is contained in:
@@ -247,14 +247,13 @@ async def chat_stream(request: DeepAgentChatRequest):
|
|||||||
"content": "",
|
"content": "",
|
||||||
"type": ""
|
"type": ""
|
||||||
}
|
}
|
||||||
delta = chunks.get("delta", "").strip()
|
delta = chunks.get("delta", "")
|
||||||
if delta:
|
payload_out.update({
|
||||||
payload_out.update({
|
"type": chunks.get("type", ""),
|
||||||
"type": chunks.get("type", ""),
|
"is_delta": True,
|
||||||
"is_delta": True,
|
"content": delta,
|
||||||
"content": delta,
|
})
|
||||||
})
|
yield f"data: {json.dumps(payload_out, ensure_ascii=False)}\n\n"
|
||||||
yield f"data: {json.dumps(payload_out, ensure_ascii=False)}\n\n"
|
|
||||||
|
|
||||||
# 获取建议消息
|
# 获取建议消息
|
||||||
if request.need_suggestion > 0 and random.random() < request.need_suggestion:
|
if request.need_suggestion > 0 and random.random() < request.need_suggestion:
|
||||||
|
|||||||
Reference in New Issue
Block a user