Commit Graph

7 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
朱潮
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
朱潮
b9f6928b50 embedding 模型独立为api 2025-11-20 13:29:44 +08:00