Commit Graph

25 Commits

Author SHA1 Message Date
Windpicker-owo
f22e6365cc feat(action): 重构 Action 激活机制并添加 go_activate() 方法
引入新的 Action 激活机制,允许通过重写 go_activate() 方法来自定义激活逻辑。提供了三个工具函数:
- _random_activation(): 随机概率激活
- _keyword_match(): 关键词匹配激活
- _llm_judge_activation(): LLM 智能判断激活

主要变更:
- 在 BaseAction 中添加 go_activate() 抽象方法和相关工具函数
- 更新 ActionModifier 使用新的激活判断逻辑
- 在 hello_world_plugin 中添加新的激活方式示例
- 更新文档说明新的激活机制
- 保持向后兼容,旧的激活类型配置仍然可用

BREAKING CHANGE: Action 激活判断现在通过 go_activate() 方法进行,旧的激活类型字段已标记为废弃但仍然兼容
2025-10-17 20:16:15 +08:00
minecraft1024a
3040000531 refactor: 将项目名称从 MaiBot 重命名为 MoFox-Bot
本次更新在整个代码库范围内将项目名称 "MaiBot" 及其相关变体(如 "maibot")统一重命名为 "MoFox-Bot"。

主要变更包括:
- 修改配置文件、模板和日志输出中的项目名称。
- 更新文档、注释和用户可见的字符串,以反映新的品牌名称。
- 调整插件元数据和描述。
2025-10-11 20:46:00 +08:00
Windpicker-owo
b697af4d3a 更新event doc 2025-09-15 11:50:34 +08:00
minecraft1024a
add68fcf58 docs: remove outdated and unused documentation files
A significant number of documentation files, including design documents, user guides, and old images, have been removed to clean up the repository and eliminate outdated information. This reduces clutter and ensures that the documentation accurately reflects the current state of the project.

Key removals include:
- `memory_system_design_v3.md`
- `model_configuration_guide.md`
- `PERMISSION_SYSTEM.md`
- `CONTRIBUTE.md`
- `vector_db_usage_guide.md
2025-08-28 20:41:44 +08:00
minecraft1024a
77bad4891d docs(plugins): remove outdated tool documentation
Removes the `tool-components.md` and `tool_caching_guide.md` files as they are no longer relevant after recent refactoring of the tool and caching systems. This cleanup ensures the documentation stays current with the codebase.
2025-08-28 20:21:53 +08:00
minecraft1024a
eb1feeeb0b refactor(cache): 重构工具缓存机制并优化LLM请求重试逻辑
将工具缓存的实现从`ToolExecutor`的装饰器模式重构为直接集成。缓存逻辑被移出`cache_manager.py`并整合进`ToolExecutor.execute_tool_call`方法中,简化了代码结构并使其更易于维护。

主要变更:
- 从`cache_manager.py`中移除了`wrap_tool_executor`函数。
- 在`tool_use.py`中,`execute_tool_call`现在包含完整的缓存检查和设置逻辑。
- 调整了`llm_models/utils_model.py`中的LLM请求逻辑,为模型生成的空回复或截断响应增加了内部重试机制,增强了稳定性。
- 清理了项目中未使用的导入和过时的文档文件,以保持代码库的整洁。
2025-08-28 20:10:32 +08:00
minecraft1024a
41e862281d 替换名字 2025-08-28 17:58:08 +08:00
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