feat(ai): 知识库 V2 集成 — 多知识源路由 + AI 分析自动注入

- KnowledgeV2Source: 实现 KnowledgeSource trait,自动搜索所有启用的知识库
- AnalysisService.knowledge_sources: 改 Option → Vec 支持多知识源
- 最佳匹配策略:遍历所有知识源取最高 confidence 的上下文注入 system prompt
- main.rs 共享 EmbeddingService + KnowledgeV2Service 实例

Phase 2 Task 12-15
This commit is contained in:
iven
2026-05-27 00:30:49 +08:00
parent 7d1b1f9c7c
commit 823d69a3c3
4 changed files with 217 additions and 38 deletions

View File

@@ -1,4 +1,5 @@
pub mod structured_source;
pub mod v2_source;
pub mod vector_search;
pub mod vector_source;