Revert "新增中间件控制拦截工具调用 判断use_report是否开启"

This reverts commit 34cf3456cd.
This commit is contained in:
zcr
2026-04-02 11:34:07 +08:00
parent 79258a6a43
commit 702f48626f
5 changed files with 336 additions and 341 deletions

View File

@@ -104,7 +104,7 @@ async def chat_stream(request: DeepAgentChatRequest):
# 构建主agent
workspace_dir = os.path.join(PROJECT_ROOT, f"agent_workspace/{target_thread_id}")
logger.info(f"chat request data: {request} | target_thread_id : workspace_dir: {workspace_dir}")
main_agent = build_main_agent(workspace_dir, request.enable_thinking)
main_agent = build_main_agent(request.use_report, workspace_dir, request.enable_thinking)
# 2. 配置參數
temp = request.config_params.temperature if request.config_params else 0.7
@@ -387,7 +387,7 @@ async def get_chat_history(thread_id: str):
history_data = []
workspace_dir = os.path.join(PROJECT_ROOT, f"agent_workspace/{thread_id}")
main_agent = build_main_agent(workspace_dir, enable_thinking=False)
main_agent = build_main_agent(False, workspace_dir, enable_thinking=False)
async for state in main_agent.aget_state_history(config):
msg_content = "Initial"
if state.values and "messages" in state.values: