Refine agent background reply handling

This commit is contained in:
jxxghp
2026-04-30 00:25:23 +08:00
parent 11478faff3
commit 6532c60a3c
8 changed files with 128 additions and 50 deletions
+2 -2
View File
@@ -210,7 +210,7 @@ class SearchChain(ChainBase):
"""
通过统一后台提示词机制执行资源推荐。
"""
from app.agent import agent_manager
from app.agent import ReplyMode, agent_manager
from app.agent.prompt import prompt_manager
prompt = prompt_manager.render_system_task_message(
@@ -226,7 +226,7 @@ class SearchChain(ChainBase):
message=prompt,
session_prefix="__agent_search_recommend",
output_callback=on_output,
suppress_user_reply=True,
reply_mode=ReplyMode.CAPTURE_ONLY,
persist_output_message=False,
allow_message_tools=False,
)