From 5404a9c124656e23d1cf3b34f1bffeaf8bbca3bf Mon Sep 17 00:00:00 2001 From: Windpicker-owo <3431391539@qq.com> Date: Tue, 16 Dec 2025 13:50:27 +0800 Subject: [PATCH] =?UTF-8?q?refactor(prompt=5Fbuilder):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20Planner=20=E6=A8=A1=E5=BC=8F=E4=B8=8B=E7=9A=84?= =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=96=87=E6=9E=84=E5=BB=BA=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E5=87=8F=E5=B0=91=E5=A4=84=E7=90=86=E5=BB=B6=E8=BF=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../built_in/kokoro_flow_chatter/prompt/builder.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/built_in/kokoro_flow_chatter/prompt/builder.py b/src/plugins/built_in/kokoro_flow_chatter/prompt/builder.py index cb0a3ebeb..128f1a706 100644 --- a/src/plugins/built_in/kokoro_flow_chatter/prompt/builder.py +++ b/src/plugins/built_in/kokoro_flow_chatter/prompt/builder.py @@ -75,12 +75,12 @@ class PromptBuilder: # 1.6. 构建自定义决策提示词块 custom_decision_block = self._build_custom_decision_block() - # 2. 使用 context_builder 获取关系、记忆、工具、表达习惯等 - context_data = await self._build_context_data(user_name, chat_stream, user_id) - relation_block = context_data.get("relation_info", f"你与 {user_name} 还不太熟悉,这是早期的交流阶段。") - memory_block = context_data.get("memory_block", "") - tool_info = context_data.get("tool_info", "") - expression_habits = self._build_combined_expression_block(context_data.get("expression_habits", "")) + # 2. Planner(分离模式)不做重型上下文构建:记忆检索/工具信息/表达习惯检索等会显著拖慢处理 + # 这些信息留给 Replyer(生成最终回复文本)阶段再获取。 + relation_block = "" + memory_block = "" + tool_info = "" + expression_habits = "" # 3. 构建活动流 activity_stream = await self._build_activity_stream(session, user_name)