refactor: 将 RAG 节点拆分为独立模块
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Has been cancelled

- 新增 rag_nodes.py: 独立的 RAG 检索节点
- 从 react_nodes.py 移除 RAG 相关代码
- 更新导入和导出
- rag_nodes.py 包含 rag_retrieve_node 和 rag_re_retrieve_node
- 添加 inject_rag_tool_to_state 工具函数
This commit is contained in:
2026-04-26 11:23:12 +08:00
parent e3adb45454
commit aba261df35
4 changed files with 250 additions and 138 deletions

View File

@@ -10,11 +10,11 @@ from .state import MainGraphState, CurrentAction
from .react_nodes import (
init_state_node,
react_reason_node,
rag_retrieve_node,
error_handling_node,
final_response_node,
route_by_reasoning
)
from .rag_nodes import rag_retrieve_node
from ..agent_subgraphs.contact import build_contact_subgraph
from ..agent_subgraphs.dictionary import build_dictionary_subgraph
from ..agent_subgraphs.news_analysis import build_news_analysis_subgraph