diff --git a/astrbot/core/pipeline/process_stage/method/llm_request.py b/astrbot/core/pipeline/process_stage/method/llm_request.py index 505b18e8e..d1b45f4aa 100644 --- a/astrbot/core/pipeline/process_stage/method/llm_request.py +++ b/astrbot/core/pipeline/process_stage/method/llm_request.py @@ -113,14 +113,14 @@ class LLMRequestSubStage(Stage): ) if not conversation_id: conversation_id = await self.conv_manager.new_conversation( - event.unified_msg_origin + event.unified_msg_origin, event.get_platform_id() ) conversation = await self.conv_manager.get_conversation( event.unified_msg_origin, conversation_id ) if not conversation: conversation_id = await self.conv_manager.new_conversation( - event.unified_msg_origin + event.unified_msg_origin, event.get_platform_id() ) conversation = await self.conv_manager.get_conversation( event.unified_msg_origin, conversation_id diff --git a/packages/astrbot/main.py b/packages/astrbot/main.py index b3b4954d3..8ca2e5ca4 100644 --- a/packages/astrbot/main.py +++ b/packages/astrbot/main.py @@ -638,7 +638,9 @@ UID: {user_id} 此 ID 可用于设置管理员。 session_curr_cid = await conv_mgr.get_curr_conversation_id(umo) if not session_curr_cid: - session_curr_cid = await conv_mgr.new_conversation(umo) + session_curr_cid = await conv_mgr.new_conversation( + umo, message.get_platform_id() + ) contexts, total_pages = await conv_mgr.get_human_readable_context( umo, session_curr_cid, page, size_per_page @@ -763,7 +765,7 @@ UID: {user_id} 此 ID 可用于设置管理员。 return cid = await self.context.conversation_manager.new_conversation( - message.unified_msg_origin + message.unified_msg_origin, message.get_platform_id() ) # 长期记忆 @@ -797,7 +799,9 @@ UID: {user_id} 此 ID 可用于设置管理员。 session_id=sid, ) ) - cid = await self.context.conversation_manager.new_conversation(session) + cid = await self.context.conversation_manager.new_conversation( + session, message.get_platform_id() + ) message.set_result( MessageEventResult().message( f"群聊 {session} 已切换到新对话: 新对话({cid[:4]})。" diff --git a/packages/session_controller/main.py b/packages/session_controller/main.py index 131197643..0c8ba8c95 100644 --- a/packages/session_controller/main.py +++ b/packages/session_controller/main.py @@ -63,7 +63,7 @@ class Waiter(Star): else: # 创建新对话 curr_cid = await self.context.conversation_manager.new_conversation( - event.unified_msg_origin + event.unified_msg_origin, platform_id=event.get_platform_id() ) # 使用 LLM 生成回复