-
Notifications
You must be signed in to change notification settings - Fork 110
feat: 重构向量存储架构和优化思维导图生成 #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
主要改进:
**向量存储架构优化**
- 实现每个笔记本独立的向量表(vec_{notebookId}),替代全局 vec_embeddings
- 添加 vec_metadata 表追踪每个笔记本的向量维度
- 支持动态向量维度(768, 1024, 1536等),自动检测嵌入模型输出维度
- 修复维度不匹配错误(Expected 1024 dimensions but received 768)
**AI 提供商兼容性**
- 修复 Qwen 提供商与 AI SDK v5 的兼容性问题
- 将 Qwen 从 qwen-ai-provider 迁移到 @ai-sdk/openai-compatible
- 解决 UnsupportedModelVersionError 错误
**思维导图生成改进**
- 优化提示词结构,添加明确的格式要求和示例
- 修复 schema 验证错误:chunkIds 和 keywords 字段支持 null 值
- 增强内容聚合:MAX_CHUNKS_PER_DOC 从 10 提升到 30
- 添加详细的调试日志(输入提示词、模型输出、错误信息)
**技术细节**
- 修改文件:9个核心文件
- 新增功能:动态向量表管理、维度自动检测
- 性能优化:提升内容聚合效率
- 调试改进:完整的输入输出日志追踪
此次重构解决了多个关键问题,提升了系统的灵活性和稳定性。
Code reviewFound 1 issue:
Lines 225 to 246 in d37edfa
The PR introduces a new 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
@jimmyken 感谢贡献!可以运行一下数据库迁移的指令吗?自动生成一下SQLite的迁移SQL |
主要改进:
向量存储架构优化
AI 提供商兼容性
思维导图生成改进
技术细节
此次重构解决了多个关键问题,提升了系统的灵活性和稳定性。