Files
abot/plugins/maibot_adapter/README.md

51 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# MaiBot Adapter 插件
这个插件现在已经改成对接 `MaiBot 官方 API Server`,不再依赖 `WebUI 聊天页` 那套 token + ws-token + `/api/webui/ws` 流程。
## 当前能力
1. 默认把 abot 收到的群聊/私聊消息旁路发送给 MaiBot作为上下文与记忆输入。
2. 默认不阻断其它插件链路,`ai_auto_response``Dify`、命令插件仍可继续照常处理。
3. 是否真的把 MaiBot 的回复发回微信,由 `enable_reply_output``reply_group_messages``reply_private_messages` 以及群功能开关共同控制。
4. 使用官方 API Server 协议:
- WebSocket 握手头:`x-uuid` / `x-apikey` / `x-platform`
- 消息包类型:`sys_std`
- 负载结构:`APIMessageBase`
5. 支持把图片、语音、视频、位置、应用消息转换成文本占位符发给 MaiBot方便它做长期上下文理解。
## 推荐定位
这套插件更适合做两件事:
1. 让 MaiBot 成为 `ai_auto_response` 之外的一条“长期对话与记忆”能力链路。
2. 先把全量消息采集给 MaiBot等效果稳定后再逐步提高它的主动参与度。
## 配置重点
`config.toml`
1. `api_server_ws_url`
- 例如 `ws://192.168.2.240:18009/ws`
2. `api_key`
- 用于官方 API Server 路由
3. `enable_reply_output`
- 控制“MaiBot 能不能实际开口说话”
4. `respect_group_feature_switch`
- 控制群里是否还要继续受 abot 功能权限开关约束
## 现阶段建议
如果你打算逐步替代 `ai_auto_response`,建议按这个顺序推进:
1. 先保持 `collect_group_messages=true``enable_reply_output=false`,只观察 MaiBot 记忆与理解效果。
2. 然后打开 `enable_reply_output=true`,但先让少量测试群开启 `MAIBOT_CHAT` 功能权限。
3. 确认稳定后,再决定是让 MaiBot 成为独立对话插件,还是进一步吸收进 `ai_auto_response` 主流程。
## Dashboard / WebUI
当前远端 `192.168.2.240` 已经补好官方 dashboard 静态资源,访问地址如下:
1. WebUI 首页:`http://192.168.2.240:18001/`
2. 健康检查:`http://192.168.2.240:18001/api/webui/health`
3. 官方 API Server WebSocket`ws://192.168.2.240:18009/ws`