Commit Graph

14 Commits

Author SHA1 Message Date
朱潮
45f3a61a16 🐛 fix(mem0): fix connection pool exhausted error
修复 Mem0 连接池耗尽错误,问题根因是 CustomMem0Embedding.embed()
方法中使用 asyncio.run() 导致事件循环泄漏。

主要修改:
- 使用线程池替代 asyncio.run() 避免事件循环泄漏
- 添加线程安全的模型缓存机制
- 为 Mem0 实例缓存添加 LRU 机制,最多保留 50 个实例
- 在 GlobalModelManager 中添加 get_model_sync() 同步方法

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-21 18:17:45 +08:00
朱潮
77c8f5e501 settings 2025-12-15 21:58:54 +08:00
朱潮
3973174c83 日志优化 2025-11-27 21:50:03 +08:00
朱潮
a40da62413 add terms 2025-11-27 14:42:22 +08:00
朱潮
9b8c07a2e6 替换embedding模型 2025-11-20 22:45:11 +08:00
朱潮
1dd15185d6 降维到128 2025-11-20 21:37:46 +08:00
朱潮
ef7cb7560f 删除model_client 2025-11-20 20:54:38 +08:00
朱潮
37784ebefe 优化向量检索 2025-11-20 19:36:19 +08:00
朱潮
b9f6928b50 embedding 模型独立为api 2025-11-20 13:29:44 +08:00
朱潮
906dc35dd5 embedding.pkl 2025-10-25 22:02:04 +08:00
朱潮
607d20492c add SENTENCE_TRANSFORMER_DEVICE 2025-10-20 19:56:50 +08:00
朱潮
2b4c0fd63d add utils 2025-10-17 22:04:10 +08:00
朱潮
e1c2df763e add embedding 2025-10-17 10:07:50 +08:00
朱潮
d0e3e62291 add semantic search 2025-10-16 21:06:02 +08:00