Commit Graph

18 Commits

Author SHA1 Message Date
minecraft1024a
af17290595 feat(tool_system): implement declarative caching for tools
This commit refactors the tool caching system to be more robust, configurable, and easier to use. The caching logic is centralized within the `wrap_tool_executor`, removing the need for boilerplate code within individual tool implementations.

Key changes:
- Adds `enable_cache`, `cache_ttl`, and `semantic_cache_query_key` attributes to `BaseTool` for declarative cache configuration.
- Moves caching logic from a simple history-based lookup and individual tools into a unified handling process in `wrap_tool_executor`.
- The new system leverages the central `tool_cache` manager for both exact and semantic caching based on tool configuration.
- Refactors `WebSurfingTool` and `URLParserTool` to utilize the new declarative caching mechanism, simplifying their code.
2025-08-27 18:45:59 +08:00
雅诺狐
0e815779b7 Merge branch 'master' of https://github.com/MaiBot-Plus/MaiMbot-Pro-Max 2025-08-26 14:20:32 +08:00
雅诺狐
4a44ba9866 全面更换orjson 2025-08-26 14:20:26 +08:00
ikun两年半
83ff158dd8 更改了文档中机器人的名字喵~ 2025-08-25 23:30:43 +08:00
ikun两年半
a55bdfd0e3 笨蛋猫猫又有几个地方没改喵…… 2025-08-25 23:27:57 +08:00
ikun两年半
8ae4ce3e1b 笨蛋猫猫又有几个地方忘记改了喵…… 2025-08-25 23:23:25 +08:00
ikun两年半
07b03970b5 更改了文档中机器人的名字喵 2025-08-25 23:21:21 +08:00
ikun两年半
1b129b6bd7 更改了文档中机器人的名字喵~ 2025-08-25 23:14:39 +08:00
ikun两年半
2512983f77 更改了文档中机器人的名字喵~ 2025-08-25 23:13:29 +08:00
ikun两年半
68191ba090 笨蛋猫猫又有一点忘改了喵…… 2025-08-25 23:10:43 +08:00
ikun两年半
c00b087a7f 更改了文档中机器人的名字喵~ 2025-08-25 23:10:01 +08:00
Windpicker-owo
272f48299a 修复post_llm,以及event使用说明 2025-08-25 19:12:26 +08:00
minecraft1024a
22f6cd2d94 feat(deps): 实现依赖包智能别名解析
引入了依赖包智能别名解析机制,以解决 Python 生态中常见的安装名与导入名不一致的问题(如 `beautifulsoup4` -> `bs4`)。

当通过包名直接导入失败时,依赖管理器会自动查询一个内置的别名映射表,并尝试使用别名再次导入。这大大提升了开发者在定义简单字符串格式依赖时的体验,减少了因名称不一致导致的依赖检查失败。

同时,更新了相关文档,详细说明了该功能的工作原理、解决了什么问题,并更新了最佳实践。
2025-08-18 13:48:55 +08:00
minecraft1024a
20b676e4e0 更新依赖管理配置,新增使用PyPI镜像源的选项以加速包下载,优化文档以清晰描述镜像源和代理设置,调整相关代码以支持新的配置项。 2025-08-13 12:47:09 +08:00
minecraft1024a
d78bf618f9 优化依赖管理配置,移除不必要的allowed_auto_install选项,更新文档以更清晰地描述自动安装功能的主开关。调整相关代码以简化逻辑,确保自动安装行为通过单一配置控制。 2025-08-13 12:35:41 +08:00
minecraft1024a
97351ce1ae 新增插件Python依赖管理系统,支持自动检查和安装依赖,优化依赖配置和错误处理,更新相关文档和示例代码。 2025-08-13 12:32:07 +08:00
雅诺狐
05cba1bb09 添加了一个发送api 2025-08-12 17:32:45 +08:00
雅诺狐
2d4745cd58 初始化 2025-08-11 19:34:18 +08:00