Fix:when stream=false,new message without sessionid does no (#8078)

### What problem does this PR solve?
https://github.com/infiniflow/ragflow/issues/8070

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Stephen Hu
2025-06-05 15:14:15 +08:00
committed by GitHub
parent 7c7359a9b2
commit 6953ae89c4

View File

@ -90,6 +90,7 @@ def completion(tenant_id, chat_id, question, name="New session", session_id=None
"user_id": kwargs.get("user_id", "")
}
ConversationService.save(**conv)
if stream:
yield "data:" + json.dumps({"code": 0, "message": "",
"data": {
"answer": conv["message"][0]["content"],