perf(cache): 修复缓存 key 不匹配 Bug + embedding 缓存 + 清理 AgenticRAG 死代码

- cache.py: get/set 统一使用粗粒度 key(基于 kb_version),修复缓存永远不命中的问题
- engine.py: 新增 _encode_cached() 方法,embedding 编码走 LRU 缓存
- 删除 10 个 core/agentic_*.py 死文件(~1950 行)
- 清理 api/__init__.py 和 chat_routes.py 中的 AgenticRAG 残留引用
This commit is contained in:
lacerate551
2026-06-08 16:05:28 +08:00
parent 6deba8fae2
commit 8af8d38c01
16 changed files with 94 additions and 2052 deletions

View File

@@ -3,7 +3,6 @@ RAG 核心引擎模块
包含:
- engine: RAGEngine 单例类,管理模型和共享资源
- agentic: AgenticRAG 智能问答
- bm25_index: BM25 关键词检索索引
- chunker: 文本分块器
"""