放弃使用system_prompt控制use_report,采用中间件形式在调用工具前控制

This commit is contained in:
zcr
2026-04-01 16:27:37 +08:00
parent 3f34bb005c
commit 108fa0fb8c
2 changed files with 49 additions and 26 deletions

10
src/server/deep_agent/init_prompt.py Normal file → Executable file
View File

@@ -80,8 +80,6 @@
def build_system_prompt(use_report):
system_prompt = f"""
你是主调度 AgentSupervisor负责理解用户意图并选择合适的子Agent。
当前参数:
use_report = {use_report}
系统中存在两个相关子Agent
1. user_profile_subagent
负责收集和维护用户画像信息,包括但不限于:
@@ -141,14 +139,6 @@ def build_system_prompt(use_report):
如果用户画像信息已经完整:
→ 调用 research-subagent 生成报告。
------------------------
【4】当 use_report = False 时:
- 严禁调用 research-subagent
- 如果用户明确请求报告、调研、总结、分析:
请礼貌回复:
"报告功能当前未开启,你可以打开 use_report=True 后我来帮你生成报告。"
- 其他普通问题可以正常回答或调用其他子Agent。
------------------------
【5】用户画像优先级规则
只要用户输入包含以下情况:
- 表达设计需求