合并代码,解决冲突

(cherry picked from commit 8b23bd771f04ceb1b9c1e3ae021d75001af5ba2f)
This commit is contained in:
hugo authored and sophie committed 2026-06-01 17:52:50 +08:00
1 parent 23badf7456
commit 93e99793d8
10 files changed
+626 -84

No files matched your search

+2 -1
View File
@@ -263,7 +263,7 @@ WHERE c002001 = ?
return "\n".join(sections)
@classmethod
def stream_chat(cls, query: str, user, agent, conversation_id: str = None):
def stream_chat(cls, query: str, user, agent, conversation_id: str = None, session_id: str | None = None):
start_time = time.time()
final_conversation_id = conversation_id or f"hr_{int(time.time())}"
try:
@@ -319,6 +319,7 @@ WHERE c002001 = ?
user_id=user.id,
agent_id=agent.id,
conversation_id=final_conversation_id,
session_id=session_id,
query=query,
answer=result_text,
tokens_used=0,