From b3387b3ec7528b4a6ff48b6f158cd745565884f0 Mon Sep 17 00:00:00 2001 From: root <953994191@qq.com> Date: Fri, 1 May 2026 13:06:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=9D=E5=A7=8B=E5=8C=96=20RAG=20?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E5=90=8E=E8=B0=83=E7=94=A8=20set=5Fglobal=5F?= =?UTF-8?q?rag=5Ftool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/agent/agent_service.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/app/agent/agent_service.py b/backend/app/agent/agent_service.py index 4e15210..e5127b9 100644 --- a/backend/app/agent/agent_service.py +++ b/backend/app/agent/agent_service.py @@ -37,6 +37,9 @@ class AIAgentService: if rag_tool: self.tools.append(rag_tool) self.tools_by_name[rag_tool.name] = rag_tool + # 关键:设置全局 RAG 工具,供 rag_nodes.py 使用 + from app.main_graph.nodes.rag_nodes import set_global_rag_tool + set_global_rag_tool(rag_tool) # 2. 构建各模型的 Graph(使用新版 React 模式) chat_services = get_all_chat_services()