|
|
bfb2ddbe76
|
test: 适配新的 final_reply 返回格式
|
2026-05-08 02:08:22 +08:00 |
|
|
|
5b41598d50
|
重构:简化流式架构,将 ReAct 循环移入 agent 节点
构建并部署 AI Agent 服务 / deploy (push) Successful in 5m41s
主要变更:
- 简化 agent_service:移除复杂双协程,只用 stream_mode=["updates"]
- stream_context:提供更清晰的 API (set_stream_queue/get_stream_queue)
- main_graph_builder:简化图结构,移除 tools 节点和条件边
- agent 节点:包含完整 ReAct 循环 + 流式 Tool Calling 拼接
- 前端:适配新的事件格式
- 添加测试文件:test_full_react_streaming.py, test_stream.py
|
2026-05-07 02:56:35 +08:00 |
|
|
|
22fdb625a4
|
feat: 完成极简 LangGraph 架构迁移,添加 Baosi API 支持
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m36s
主要变更:
- 迁移到极简 LangGraph 标准架构(START → init_state → 记忆 → Agent ⇄ Tools → finalize → END)
- 添加 Baosi API 支持,配置 ops4.7 模型
- 保留本地模型作为默认首选,Baosi 作为备选
- 新架构使用 LangGraph 原生 ToolNode 和 bind_tools
- 移除旧的混合路由、JSON 解析等复杂逻辑
- 把旧代码移到 deprecated/ 目录
- 添加新的 Agent 节点和 Tools 模块
- 添加测试脚本验证新架构
- 所有测试通过 ✓
|
2026-05-07 00:48:17 +08:00 |
|
|
|
ef6fbc1521
|
推理优化
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m36s
|
2026-05-06 04:26:06 +08:00 |
|
|
|
1260bef5cb
|
添加rag置信度判断
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m31s
|
2026-05-06 01:15:52 +08:00 |
|
|
|
3ae9daa01a
|
导入方式修改
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m44s
|
2026-05-05 23:17:00 +08:00 |
|
|
|
b5c15ef445
|
refactor: 单图方案重构 + 动态模型选择 + chat_services优化
构建并部署 AI Agent 服务 / deploy (push) Successful in 12m9s
## 核心改动
### 1. 单图方案重构
- 删除了多图(self.graphs),改为单图(self.graph)
- 新增 MainGraphState.current_model 字段用于运行时注入模型
- llm_call 节点改为动态选择模型(create_dynamic_llm_call_node)
### 2. chat_services 优化
- 添加 _cached_services 缓存,避免重复初始化
- 新增 get_cached_chat_services() 函数,用于单图注入
- 新增 _check_http_service_available() 统一HTTP探测逻辑
- 减少重复代码,LocalVLLMChatProvider和LocalSmallModelProvider共用探测方法
### 3. AIAgentService 重构
- initialize() 只构建一次图,传入 chat_services 字典
- 新增 _resolve_model() 模型回退逻辑
- 新增 _build_invocation() 统一构建调用参数
- process_message() 和 process_message_stream() 改为注入 current_model
- 流式处理代码拆分,增加可读性
### 4. 新增和删除文件
- 新增:backend/app/main_graph/main_graph_builder.py(图构建)
- 新增:backend/app/main_graph/subgraph_wrapper.py(子图封装)
- 新增:tools/test/test_tavily_search.py(测试)
- 删除:backend/app/main_graph/graph.py(旧图)
- 删除:backend/app/main_graph/utils/main_graph_builder.py(旧构建器)
- 删除:backend/app/main_graph/utils/__init__.py
### 5. 其他更新
- README.md:新增模型服务使用情况详解章节
- backend/app/model_services/__init__.py:新增 get_cached_chat_services 导出
## 方案优势
- 内存优化:N张图 → 1张图
- 灵活性:运行时动态选择模型,支持同会话不同模型
- 性能:模型服务缓存,初始化仅一次
- 可维护性:减少重复代码,统一HTTP探测逻辑
|
2026-05-05 17:30:55 +08:00 |
|
|
|
8c021c264e
|
修改readme
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m28s
|
2026-05-05 13:30:31 +08:00 |
|
|
|
128aad0c22
|
refactor: 重构快速路径流程,统一通过 llm_call 输出
构建并部署 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 |
|
|
|
acc8d801f3
|
修复代码,实现rag测试
构建并部署 AI Agent 服务 / deploy (push) Successful in 6m11s
|
2026-05-04 20:31:04 +08:00 |
|
|
|
c9bf21be0e
|
fix: 修复 RAG 无限循环问题和导入错误
构建并部署 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核心组件,简化代码结构和测试文件
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m53s
|
2026-05-04 17:58:10 +08:00 |
|
|
|
a07e398739
|
refactor!: 完全异步化 RAG 系统,移除 LangChain ParentDocumentRetriever 依赖
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m34s
- 重写 rag_core/vector_store.py:完全异步实现 aadd_documents、asimilarity_search
- 重写 app/rag/retriever.py:异步混合检索,移除同步兼容代码
- 修改 rag_indexer/index_builder.py:全链路异步调用
- 删除 rag_core/retriever_factory.py:不再使用 LangChain ParentDocumentRetriever
- 清理冗余导入和代码:移除 model_services 兼容、不需要的异常导入
- 更新 rag_indexer/README.md:反映新架构
核心改进:
- 完全异步化:索引构建和检索全链路 async/await
- 自定义实现:不再依赖 LangChain 的 ParentDocumentRetriever
- 双向量支持:子文档同时存储 dense + sparse 向量到 Qdrant
- 架构清晰:rag_core 公共组件、rag_indexer 索引、app/rag 检索
|
2026-05-04 14:33:12 +08:00 |
|
|
|
4209386c77
|
refactor: 统一导入方式,移除 sys.path 操作
构建并部署 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,实现混合检索
构建并部署 AI Agent 服务 / deploy (push) Successful in 5m42s
|
2026-05-04 04:28:32 +08:00 |
|
|
|
44d89acdb5
|
fix: 修复本地llm服务不可用问题 + 统一模型缓存目录位置
构建并部署 AI Agent 服务 / deploy (push) Has been cancelled
- 修复 config.py 添加 LOCAL_MODEL_NAME 配置项
- 修复 chat_services.py 本地模型检测时API路径重复问题(/v1/models -> /models)
- 更新 .gitignore,移除模型目录跟踪
- 统一模型缓存到 docker/models/fastembed_cache,避免重复
- 更新 Dockerfile,正确复制预下载的BM25模型缓存
|
2026-05-04 03:26:19 +08:00 |
|
|
|
8af82f8f7f
|
feat: RAG混合检索系统完整实现 + 启动脚本修复
构建并部署 AI Agent 服务 / deploy (push) Failing after 5m4s
- 实现了稠密+稀疏混合检索,使用 Qdrant 原生 RRF 融合
- 修复了 retriever.py 的 BaseRetriever 继承和稀疏向量包装问题
- 修复了 pipeline.py 的 Optional 导入问题
- 添加了稀疏 embedder 的缓存配置
- 简化了 vector_store.py,移除不必要的逻辑
- 修复了 start.sh 的 PROJECT_DIR 硬编码和端口配置问题
- 完善了 RAG 检索的测试文件
|
2026-05-04 02:54:37 +08:00 |
|
|
|
60afa86ded
|
feat: 实现 BM25 稀疏 + 稠密向量混合检索功能
构建并部署 AI Agent 服务 / deploy (push) Has been cancelled
|
2026-05-04 02:01:22 +08:00 |
|