114 lines
2.6 KiB
Markdown
114 lines
2.6 KiB
Markdown
# 192.168.2.240 上的 MaiBot 部署说明
|
||
|
||
这份文档记录当前 `MaiBot 官方镜像` 在 `192.168.2.240` 的实际部署状态,供 `plugins/maibot_adapter` 对接使用。
|
||
|
||
## 当前结论
|
||
|
||
1. `MaiBot` 使用官方镜像 `sengokucola/maibot:latest` 部署。
|
||
2. 没有改动 MaiBot 源码,dashboard 通过官方 `maibot-dashboard==1.0.0` 静态资源挂载方式补齐。
|
||
3. `abot` 侧不再走 WebUI 聊天页,而是改走 `官方 API Server`。
|
||
4. 现在的推荐接入地址如下:
|
||
- WebUI / Dashboard:`http://192.168.2.240:18001/`
|
||
- WebUI Health:`http://192.168.2.240:18001/api/webui/health`
|
||
- 官方 API Server WS:`ws://192.168.2.240:18009/ws`
|
||
|
||
## 当前 docker-compose 关键点
|
||
|
||
容器名:
|
||
|
||
```text
|
||
maibot-core-lite
|
||
```
|
||
|
||
镜像:
|
||
|
||
```text
|
||
sengokucola/maibot:latest
|
||
```
|
||
|
||
核心端口映射:
|
||
|
||
```text
|
||
18001 -> 8001 # WebUI / Dashboard / WebUI API
|
||
18009 -> 8090 # 官方 API Server
|
||
```
|
||
|
||
## Dashboard 访问地址
|
||
|
||
当前已经补全完成,可直接访问:
|
||
|
||
```text
|
||
http://192.168.2.240:18001/
|
||
```
|
||
|
||
如果只想看健康状态:
|
||
|
||
```text
|
||
http://192.168.2.240:18001/api/webui/health
|
||
```
|
||
|
||
期待返回:
|
||
|
||
```json
|
||
{"status":"healthy","service":"MaiBot WebUI"}
|
||
```
|
||
|
||
## embedding 模型现状
|
||
|
||
当前远端已切到 Ollama 向量服务:
|
||
|
||
```text
|
||
ollama_base_url = "http://192.168.2.50:11434/v1"
|
||
embedding_model = "bge-m3:latest"
|
||
```
|
||
|
||
这套配置已经验证可用,MaiBot 日志里能看到 embedding 维度识别成功。
|
||
|
||
## 官方 API Server 接入方式
|
||
|
||
`maibot_adapter` 现在用的是官方 API Server 协议,不再使用:
|
||
|
||
1. `POST /api/webui/auth/verify`
|
||
2. `GET /api/webui/ws-token`
|
||
3. `WS /api/webui/ws?token=...`
|
||
|
||
现在实际使用的是:
|
||
|
||
1. `WS ws://192.168.2.240:18009/ws`
|
||
2. 握手头:
|
||
- `x-uuid`
|
||
- `x-apikey`
|
||
- `x-platform`
|
||
3. 消息包类型:
|
||
- `sys_std`
|
||
4. 负载结构:
|
||
- `APIMessageBase`
|
||
|
||
## abot 配置建议
|
||
|
||
当前 `plugins/maibot_adapter/config.toml` 推荐值:
|
||
|
||
```toml
|
||
[MaiBotAdapter]
|
||
enable = true
|
||
collect_group_messages = true
|
||
collect_private_messages = true
|
||
enable_reply_output = true
|
||
reply_group_messages = true
|
||
reply_private_messages = true
|
||
respect_group_feature_switch = true
|
||
mention_user_on_group_reply = false
|
||
api_server_ws_url = "ws://192.168.2.240:18009/ws"
|
||
api_key = "abot-maibot"
|
||
platform_name = "abot-maibot"
|
||
```
|
||
|
||
## 设计边界
|
||
|
||
当前这套接法遵循你已经确认过的原则:
|
||
|
||
1. 消息默认发送给 MaiBot 做采集。
|
||
2. 是否真的回复,由开关和群功能权限控制。
|
||
3. 不重新开发 MaiBot 对话/记忆本体能力。
|
||
4. 尽量把“参与聊天”的判断留在 MaiBot 侧,而不是在 abot 里再做一遍复杂前置策略。
|