Commit Graph

22 Commits

Author SHA1 Message Date
8c021c264e 修改readme
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m28s
2026-05-05 13:30:31 +08:00
128aad0c22 refactor: 重构快速路径流程,统一通过 llm_call 输出
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 5m31s
- 重构 fast_paths.py,让 fast_chitchat 和 fast_rag 都进入 llm_call 而不是直接设置 final_result
- 修改 check_fast_path_success 函数返回 'llm_call' 而不是 'success'
- 更新 main_graph_builder.py 的条件边配置,支持路由到 llm_call
- 在快速路径节点中添加清除 state.final_result 的逻辑,避免复用旧结果
- 重构 RAG 工具初始化方式,使用模块级变量管理
- 修改 finalize.py 让它返回 final_result
- 更新 agent_service.py 的 RAG 工具注入方式
- 简化 hybrid_router.py 的代码结构
- 清理 rag_nodes.py 的全局变量相关代码
- 更新相关测试文件
2026-05-05 04:32:42 +08:00
b64dade9e9 修复循环推理bug 2026-05-05 00:54:04 +08:00
c9bf21be0e fix: 修复 RAG 无限循环问题和导入错误
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Has been cancelled
主要修复:
1. 修复 RAG 推理无限循环问题(大小写不匹配 + 缺少已检索结果检查)
2. 修复 intent_classifier.py 的绝对导入错误
3. 删除旧的 start.sh 脚本,添加新的启动脚本
4. 优化路由逻辑和状态管理
2026-05-04 18:59:15 +08:00
9841f47432 refactor: 重构RAG核心组件,简化代码结构和测试文件
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m53s
2026-05-04 17:58:10 +08:00
4209386c77 refactor: 统一导入方式,移除 sys.path 操作
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m22s
- 重构所有模块导入,移除 sys.path.insert
- 统一使用 from backend.xxx 的绝对导入方式
- rag_core 包内使用相对导入(from .xxx)
- 移动 visualize_graph.py 到 tools/ 目录
- 添加必要的 __init__.py 文件
- 清理废弃文档和脚本
2026-05-04 12:55:45 +08:00
82dde7113e 修改rag,实现混合检索
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 5m42s
2026-05-04 04:28:32 +08:00
a5fc9cd5d8 完整的混合路由优化系统
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 6m8s
1. 双模型服务 (llm + smallLLM)
   - 增加 get_small_llm_service() 函数
   - 支持智谱/DeepSeek 小模型作为轻量级选项

2. 前置混合路由
   - 规则快速分流(无 LLM,超快速)
   - 轻量级意图分类(smallLLM)
   - 快速路径:fast_chitchat, fast_rag, fast_tool

3. 自动升级机制
   - 快速路径失败 → 自动回到 React 循环
   - SSE 事件增强:intent_classified, path_decision, fast_path_*, escalation

4. 向后兼容
   - build_react_main_graph(use_hybrid_router=True/False)
   - 可选择启用或禁用混合路由

5. 更新 intent.py
   - 支持 use_small_llm 参数
   - 保留原有完整功能供 React 循环使用
2026-05-03 16:45:46 +08:00
3f6bbdec92 给关键节点添加思考过程输出
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 6m41s
- react_reason_node: 直接发送自定义推理事件
- web_search_node: 添加开始/完成/错误事件
- rag_retrieve_node: 添加开始/完成/重试/错误事件
- 子图包装器: 添加子图开始/完成/错误事件
2026-05-02 09:23:07 +08:00
afddea61f8 恢复循环推理架构,子图执行完回到react_reason
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 6m37s
- 恢复子图→react_reason的边
- 保持intent.py中的逻辑:检测到subgraph_completed就返回DIRECT_RESPONSE
- 保持llm_call中的逻辑:检测到final_result就直接返回
2026-05-02 09:11:38 +08:00
2893accbc4 修复三个问题:1. 子图执行后的无限循环 2. llm_call没有输出 3. 思考打印两次
- 子图执行后直接进入finalize,避免回到react_reason循环
- llm_call节点检查是否已有final_result,避免重复调用LLM
- 直接在react_reason_node中通过adispatch_custom_event发送推理事件,避免通过state传递导致重复
2026-05-02 09:00:34 +08:00
563dea91d4 修复函数名错误:set_global_mem0_client -> set_mem0_client
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 6m4s
2026-05-02 00:25:32 +08:00
9386b9fa7a 彻底重构状态系统:整合所有旧状态到 MainGraphState,修复所有节点
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m35s
2026-05-01 23:20:31 +08:00
9a58eb8e6d 简化图架构:暂时移除记忆相关节点,先让系统工作起来
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 5m40s
2026-05-01 23:09:10 +08:00
1f177f7dfd 整合旧图和新图:添加完整的记忆检索、总结和完成流程
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 5m42s
2026-05-01 15:43:45 +08:00
229cfa67a2 修改架构:llm_call后增加观察环节注释
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 5m56s
2026-05-01 15:00:17 +08:00
4ee769a79f 重构架构:恢复统一的 llm_call 节点,移除错误的 final_response 节点
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 5m50s
2026-05-01 14:01:48 +08:00
4a881ea32d fix: 修复导入路径
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 5m56s
2026-05-01 00:36:30 +08:00
7a08aacced refactor: 重命名文件更清晰,调整最大推理步数为10
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m49s
- subgraph_builder.py → main_graph_builder.py
- service.py → agent_service.py
- 调整 max_steps 从 40 → 10
- 更新所有相关导入
2026-05-01 00:24:00 +08:00
3e438b6e1c feat: 完善联网搜索功能集成到React模式
All checks were successful
构建并部署 AI Agent 服务 / deploy (push) Successful in 6m3s
2026-04-30 23:18:08 +08:00
d6805d1db8 修复重构后的导入错误和缺失模块
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m26s
2026-04-29 17:23:20 +08:00
ef5113bffb refactor: 重构目录结构 - 简化层级
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Has been cancelled
2026-04-29 12:52:41 +08:00