Commit Graph

44 Commits

Author SHA1 Message Date
subiz
43fe6046b4 没想到吧,我还是没测试()
feat(mcp): 集成MCP SSE协议支持并扩展工具调用能力

新增MCP客户端类型(mcp_ssd),支持通过Model Context Protocol连接外部工具服务器。
更新文档和配置模板,提供完整的MCP接入指南;主程序启动时自动初始化MCP工具提供器,
tool_api 与 tool_use 核心链路新增对MCP工具的检测与调用,实现与既有插件工具的无缝兼容。
同步更新配置模型、模板与帮助文档。
2025-10-05 19:24:57 +08:00
subiz
3b7034f63e 我没测试,炸了就让一闪修,实在不行就revert()
feat(deps): 集成 MCP SSE 支持

引入 mcp>=0.9.0 与 sse-starlette>=2.2.1,完成 MCP SSE 协议客户端接入,
并在模块初始化中按需加载对应客户端。标记 TODO 清单中相关功能为已实现。
2025-10-05 17:42:26 +08:00
Windpicker-owo
b697af4d3a 更新event doc 2025-09-15 11:50:34 +08:00
minecraft1024a
9cf6cc4910 docs:新增了一份部署指南但是暂时不完整,等我们的文档仓库生出来再说 2025-08-28 21:03:52 +08:00
minecraft1024a
78e78e71ba docs: 更新模型配置指南
- 新增 `gemini` 客户端类型
- 更新 Google API 的 `base_url`
- 移除 `extra_params` 对 `gemini` 客户端的无效说明
- 新增 `anti_truncation` 参数说明
- 增加多个新的模型任务配置示例
- 将文档中的 `MaiBot` 统一为 `MoFox_Bot
2025-08-28 20:47:49 +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
5153d8f60f Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot 2025-08-28 17:59:46 +08:00
minecraft1024a
41e862281d 替换名字 2025-08-28 17:58:08 +08:00
雅诺狐
1d48478e79 Add PlusCommand enhanced command system
Introduces the PlusCommand system for simplified command development, including new base classes, argument parsing utilities, and registration logic. Updates the plugin system, component registry, and bot message handling to support PlusCommand components alongside traditional commands. Adds documentation and configuration for command prefixes, and provides a developer guide for the new system.
2025-08-27 22:21:03 +08:00
minecraft1024a
4ced72010b feat(core): 集成统一向量数据库服务并重构相关模块
本次提交引入了一个统一的、可扩展的向量数据库服务层,旨在解决代码重复、实现分散以及数据库实例泛滥的问题。

主要变更:

新增向量数据库抽象层:

在 src/common/vector_db/ 目录下创建了 VectorDBBase 抽象基类,定义了标准化的数据库操作接口。
创建了 ChromaDBImpl 作为具体的实现,并采用单例模式确保全局只有一个数据库客户端实例。
重构语义缓存 (CacheManager):

移除了对 chromadb 库的直接依赖。
改为调用统一的 vector_db_service 来进行向量的添加和查询操作。
重构瞬时记忆 (VectorInstantMemoryV2):

彻底解决了为每个 chat_id 创建独立数据库实例的问题。
现在所有记忆数据都存储在统一的 instant_memory 集合中,并通过 metadata 中的 chat_id 进行数据隔离和查询。
新增使用文档:

在 docs/ 目录下添加了 vector_db_usage_guide.md,详细说明了如何使用新的 vector_db_service 代码接口。
带来的好处:

高内聚,低耦合: 业务代码与具体的向量数据库实现解耦。
易于维护和扩展: 未来可以轻松替换或添加新的向量数据库支持。
性能与资源优化: 整个应用共享一个数据库连接,显著减少了文件句柄和内存占用
2025-08-27 19:18:28 +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
ikun两年半
9a91bba6f3 更新了文档中机器人的名字喵~ 2025-08-25 23:07:41 +08:00
ikun两年半
52bfa6b731 更新了文档中机器人的名字喵~ 2025-08-25 23:06:40 +08:00
ikun两年半
619f263f28 更改了文档中机器人的名字喵~ 2025-08-25 23:05:18 +08:00
ikun两年半
48215173bb 更改了文档中机器人的名字喵~ 2025-08-25 23:02:56 +08:00
ikun两年半
55a4076e23 笨蛋猫娘发现顶上忘改了喵…… 2025-08-25 23:01:09 +08:00
ikun两年半
b031b9a06b 更新了文档中机器人的名字喵~ 2025-08-25 23:00:15 +08:00
ikun两年半
7ad600220b 小改了一下文档喵~ 2025-08-25 21:04:39 +08:00
ikun两年半
f89af443fb 更新了贡献文档喵~
😭🤚😭🤚😭🤚
2025-08-25 19:30:50 +08:00
Windpicker-owo
272f48299a 修复post_llm,以及event使用说明 2025-08-25 19:12:26 +08:00
雅诺狐
f308adcf5b refactor: 清理代码质量和移除未使用文件
- 移除未使用的导入语句和变量
- 修复代码风格问题(空格、格式化等)
- 删除备份文件和测试文件
- 改进异常处理链式调用
- 添加权限系统数据库模型和配置
- 更新版本号至6.4.4
- 优化SQL查询使用正确的布尔表达式
2025-08-24 22:11:20 +08:00
minecraft1024a
b1b08c1814 feat:添加了月度计划 # 我要混提交 2025-08-21 12:32:48 +08:00
minecraft1024a
a0ed9dae9c 删除全新三层记忆系统架构 (V2.0) 设计文档,简化文档结构以便于后续更新和维护。 2025-08-19 14:08:31 +08:00
minecraft1024a
22f6cd2d94 feat(deps): 实现依赖包智能别名解析
引入了依赖包智能别名解析机制,以解决 Python 生态中常见的安装名与导入名不一致的问题(如 `beautifulsoup4` -> `bs4`)。

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

同时,更新了相关文档,详细说明了该功能的工作原理、解决了什么问题,并更新了最佳实践。
2025-08-18 13:48:55 +08:00
minecraft1024a
c47d666d07 chore(deps): 移除未使用的 ModelTaskConfig 导入
从 cache_manager.py 文件中删除了对 `src.config.api_ada_configs` 中 `ModelTaskConfig` 的导入,因为它在该文件中并未被使用。

添加了记忆系统的大饼

Co-authored-by: 雅诺狐 <foxcyber907@users.noreply.github.com>
2025-08-18 11:54:00 +08:00
雅诺狐
0400804056 移除了MCP 2025-08-14 23:13:11 +08:00
雅诺狐
d5777c2980 添加了MCP SEE支持
能不能用我不知道,先加进来。主要我没有服务,无法测试
2025-08-14 17:22:07 +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