Commit Graph

7 Commits

Author SHA1 Message Date
Windpicker-owo
ee15f45559 typing和防炸 2025-09-03 21:36:22 +08:00
Windpicker-owo
8149731925 修复代码格式和文件名大小写问题 2025-08-31 20:50:17 +08:00
雅诺狐
4a44ba9866 全面更换orjson 2025-08-26 14:20:26 +08:00
雅诺狐
f8ba0d0e43 Refactor web search plugin and clean up code
Refactored the web search plugin by removing the old Bing search implementation and reorganizing the plugin structure. Introduced modular search engine classes under 'web_search_tool/engines' and utility tools under 'web_search_tool/tools' and 'web_search_tool/utils'. Updated references and initialization logic to support multiple search engines and improved maintainability. Also performed minor code cleanups and replaced 'except ...: pass' with 'except ...: ...' for brevity.
2025-08-21 23:42:16 +08:00
minecraft1024a
756f8e5dc3 feat(chat): 实现可配置的主动思考范围并优化逻辑
- 将主动思考的prompt移至代码内部,并区分私聊和群聊场景。
- 增加`The_scope_that_proactive_thinking_can_trigger`配置项,允许用户将主动思考限制在“全部”、“私聊”或“群聊”范围。
- 删除了旧的`proactive_thinking_prompt_template`配置。
- 优化了主动思考的触发条件,现在会根据新的范围配置进行检查。
- 清理了代码中多余的空行和未使用的导入。
2025-08-20 11:27:37 +08:00
minecraft1024a
3bef6f4bab fix(embedding): 彻底解决事件循环冲突导致的嵌入生成异常
通过以下改动修复嵌入生成过程中的事件循环相关问题:
- 在 EmbeddingStore._get_embedding 中,改为同步创建-使用-销毁的新事件循环模式,彻底避免嵌套事件循环问题
- 调整批量嵌入 _get_embeddings_batch_threaded,确保每个线程使用独立、短生命周期的事件循环
- 新增 force_new 参数,LLM 请求嵌入任务时强制创建新的客户端实例,减少跨循环对象复用
- 在 OpenAI 客户端的 embedding 调用处补充详细日志,方便排查网络连接异常
- get_embedding() 每次都重建 LLMRequest,降低实例在多个事件循环中穿梭的概率

此次改动虽然以同步风格“硬掰”异步接口,但对现有接口零破坏,确保了向量数据库及相关知识检索功能的稳定性。(还有就是把的脚本文件夹移回来了)
2025-08-19 20:41:00 +08:00
雅诺狐
2d4745cd58 初始化 2025-08-11 19:34:18 +08:00