diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts
index 687e7767b..5cea85c2c 100644
--- a/docs/.vitepress/config.mts
+++ b/docs/.vitepress/config.mts
@@ -4,7 +4,7 @@ import { defineConfig } from "vitepress";
export default defineConfig({
title: "LangBot 文档",
description:
- "原名 QChatGPT;😎高稳定、🧩支持插件、🦄多模态的 LLM QQ / QQ频道 / OneBot 机器人 / Agent 平台",
+ "😎高稳定、🧩支持插件、🦄多模态 - 大模型原生即时通信机器人平台",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
logo: "/langbot-logo-0.5x.png",
@@ -32,69 +32,56 @@ export default defineConfig({
text: "部署 LangBot",
collapsed: true,
items: [
- // { text: "一键部署",
- // items: [
- // { text: "宝塔面板(推荐)", link: "/deploy/langbot/one-click/bt" },
- // ],
- // },
- { text: "宝塔面板部署", link: "/deploy/langbot/one-click/bt" },
{ text: "Docker部署", link: "/deploy/langbot/docker" },
+ { text: "宝塔面板部署", link: "/deploy/langbot/one-click/bt" },
{ text: "手动部署", link: "/deploy/langbot/manual" },
],
},
{
- text: "部署消息平台",
+ text: "连接消息平台",
collapsed: true,
- // link: "/deploy/platforms/",
items: [
{
- text: "aiocqhttp(推荐)",
+ text: "消息平台说明",
+ link: "/deploy/platforms/readme",
+ },
+ {
+ text: "QQ 个人号(逆向协议)",
collapsed: true,
- // link: "/deploy/platforms/aiocqhttp/",
items: [
{
text: "NapCat",
- link: "/deploy/platforms/aiocqhttp/napcat",
+ link: "/deploy/platforms/qq/aiocqhttp/napcat",
},
{
text: "Lagrange",
- link: "/deploy/platforms/aiocqhttp/lagrange",
+ link: "/deploy/platforms/qq/aiocqhttp/lagrange",
},
{
text: "llonebot",
- link: "/deploy/platforms/aiocqhttp/llonebot",
+ link: "/deploy/platforms/qq/aiocqhttp/llonebot",
},
{
text: "shamrock",
- link: "/deploy/platforms/aiocqhttp/shamrock",
+ link: "/deploy/platforms/qq/aiocqhttp/shamrock",
+ },
+ {
+ text: "go-cqhttp",
+ link: "/deploy/platforms/qq/gocq",
},
],
},
- // {
- // text: "mirai",
- // link: "/deploy/platforms/mirai",
- // },
{
- text: "go-cqhttp",
- link: "/deploy/platforms/gocq",
- },
- {
- text: "QQ官方",
- link: "/deploy/platforms/official",
+ text: "QQ 官方机器人",
+ link: "/deploy/platforms/qq/official",
},
+ { text: "企业微信", link: "/deploy/platforms/wecom/wecom" },
],
},
{ text: "填写配置信息", link: "/deploy/quick-config/config" },
{
text: "网络配置详解",
link: "/deploy/network-details",
- // collapsed: true,
- // items: [
- // { text: "LangBot和消息平台均Docker", link: "/deploy/network/langbot-platform-docker" },
- // { text: "仅LangBot Docker", link: "/deploy/network/langbot-docker" },
- // { text: "仅消息平台 Docker(不建议)", link: "/deploy/network/platform-docker" },
- // { text: "LangBot和消息平台均非Docker", link: "/deploy/network/langbot-platform-manual" },
- // ],
},
{
text: "更新 LangBot",
@@ -153,7 +140,7 @@ export default defineConfig({
collapsed: true,
items: [
{ text: "基础教程", link: "/plugin/dev/tutor" },
- { text: "消息平台实体", link: "/plugin/dev/messages" },
+ { text: "消息实体", link: "/plugin/dev/messages" },
{ text: "API 参考", link: "/plugin/dev/api-ref" },
{ text: "组件扩展", link: "/plugin/dev/extension" },
],
@@ -169,17 +156,6 @@ export default defineConfig({
{ text: "设置项管理", link: "/webui/settings" },
],
},
- // {
- // text: "规模化和商用",
- // // collapsed: true,
- // // link: "/tob/",
- // items: [
- // { text: "消息平台误导性", link: "/tob/platform" },
- // { text: "AI内容合规性", link: "/tob/provider" },
- // { text: "咨询方式", link: "/tob/contact" },
- // ],
- // },
-
{
text: "实践",
items: [
@@ -203,9 +179,7 @@ export default defineConfig({
},
{
text: "开发",
- items: [
- { text: "组件架构", link: "/develop/comp-arch" },
- ],
+ items: [{ text: "组件架构", link: "/develop/comp-arch" }],
},
],
diff --git a/docs/assets/image/wecom1.png b/docs/assets/image/wecom1.png
new file mode 100644
index 000000000..da1b1b256
Binary files /dev/null and b/docs/assets/image/wecom1.png differ
diff --git a/docs/assets/image/wecom2.png b/docs/assets/image/wecom2.png
new file mode 100644
index 000000000..c281856d0
Binary files /dev/null and b/docs/assets/image/wecom2.png differ
diff --git a/docs/assets/image/wecom3.jpg b/docs/assets/image/wecom3.jpg
new file mode 100644
index 000000000..e2a16508e
Binary files /dev/null and b/docs/assets/image/wecom3.jpg differ
diff --git a/docs/assets/image/wecom4.png b/docs/assets/image/wecom4.png
new file mode 100644
index 000000000..537703d40
Binary files /dev/null and b/docs/assets/image/wecom4.png differ
diff --git a/docs/assets/image/wecom5.png b/docs/assets/image/wecom5.png
new file mode 100644
index 000000000..d1a79c862
Binary files /dev/null and b/docs/assets/image/wecom5.png differ
diff --git a/docs/config/function/platform.md b/docs/config/function/platform.md
index f4392f150..47d7b5616 100644
--- a/docs/config/function/platform.md
+++ b/docs/config/function/platform.md
@@ -34,6 +34,17 @@
"public_guild_messages",
"direct_message"
]
+ },
+ {
+ "adapter": "wecom",
+ "enable": false,
+ "host": "0.0.0.0",
+ "port": 2290,
+ "corpid": "",
+ "secret": "",
+ "token": "",
+ "EncodingAESKey": "",
+ "contacts_secret": ""
}
],
```
@@ -122,4 +133,4 @@
"hide-exception-info": true
```
- 是否向用户隐藏AI的异常信息,如果为true,当请求AI接口出现异常时,会返回一个错误的提示给用户。而把报错详情输出在控制台。
\ No newline at end of file
+ 是否向用户隐藏AI的异常信息,如果为true,当请求AI接口出现异常时,会返回一个错误的提示给用户。而把报错详情输出在控制台。
diff --git a/docs/deploy/langbot/docker.md b/docs/deploy/langbot/docker.md
index 38e1f0ecc..027cc570a 100644
--- a/docs/deploy/langbot/docker.md
+++ b/docs/deploy/langbot/docker.md
@@ -28,7 +28,7 @@ docker compose up
首次启动会输出创建配置文件的提示,请继续按照文件配置。
容器会映射`5300`端口供 WebUI 使用,您可以访问`http://127.0.0.1:5300`查看 WebUI。
-还会映射`2280-2290`端口供使用 OneBot 协议的消息平台适配器反向连接,请继续阅读[消息平台接入文档](/deploy/platforms/aiocqhttp/napcat)。
+还会映射`2280-2290`端口供使用 OneBot 协议的消息平台适配器反向连接,请继续阅读[消息平台接入文档](/deploy/platforms/readme)。
## 注意
diff --git a/docs/deploy/langbot/manual.md b/docs/deploy/langbot/manual.md
index 748727c08..7f170a434 100644
--- a/docs/deploy/langbot/manual.md
+++ b/docs/deploy/langbot/manual.md
@@ -77,7 +77,7 @@ python main.py
- data/scenario/default.json
```
-接下来可以使用 Ctrl+C 退出程序,继续查看[部署消息平台](/deploy/platforms/aiocqhttp/napcat.html)页。
+接下来可以使用 Ctrl+C 退出程序,继续查看[部署消息平台](/deploy/platforms/readme)页。
当你部署消息平台和填写配置文件后,再次运行
```bash
diff --git a/docs/deploy/langbot/one-click/bt.md b/docs/deploy/langbot/one-click/bt.md
index c381d7aaa..8b42908f8 100644
--- a/docs/deploy/langbot/one-click/bt.md
+++ b/docs/deploy/langbot/one-click/bt.md
@@ -48,4 +48,4 @@
如果你更偏好于直接修改json配置文件,你可以看上图的查看本地映射目录,进入安装目录,`data`文件夹用于存储配置文件,`plugins`文件夹用于存储插件相关。
-接下来请继续阅读[部署消息平台](/deploy/platforms/aiocqhttp/napcat.html)页。
+接下来请继续阅读[部署消息平台](/deploy/platforms/readme)页。
diff --git a/docs/deploy/network-details.md b/docs/deploy/network-details.md
index 0899375b2..35779c138 100644
--- a/docs/deploy/network-details.md
+++ b/docs/deploy/network-details.md
@@ -1,5 +1,10 @@
# 网络配置详解
+::: info
+某些消息平台(如 QQ 个人号)需要使用独立的协议端来处理消息,如果您使用的是此类消息平台,请参考以下网络配置。
+同时,若您的 LangBot 实例需要连接其他在容器中运行的服务(如 Ollama),也可以参考以下配置,自行替换`消息平台`为`您要连接的服务`。
+:::
+
LangBot 和部分消息平台均可采用 Docker 部署,以下是四种情况下的网络配置详解。
:::info 目录
diff --git a/docs/deploy/platforms/aiocqhttp/lagrange.md b/docs/deploy/platforms/qq/aiocqhttp/lagrange.md
similarity index 100%
rename from docs/deploy/platforms/aiocqhttp/lagrange.md
rename to docs/deploy/platforms/qq/aiocqhttp/lagrange.md
diff --git a/docs/deploy/platforms/aiocqhttp/llonebot.md b/docs/deploy/platforms/qq/aiocqhttp/llonebot.md
similarity index 73%
rename from docs/deploy/platforms/aiocqhttp/llonebot.md
rename to docs/deploy/platforms/qq/aiocqhttp/llonebot.md
index 7adc99ab0..e3cc5a31c 100644
--- a/docs/deploy/platforms/aiocqhttp/llonebot.md
+++ b/docs/deploy/platforms/qq/aiocqhttp/llonebot.md
@@ -1,5 +1,7 @@
# 部署消息平台 LiteLoaderQQNT
+通过 OneBot 11 协议接入,需选择使用`aiocqhttp`作为适配器。
+
# LiteLoaderQQNT
- [LiteLoaderQQNT 的 OneBot API 插件](https://github.com/LLOneBot/LLOneBot) 注入 QQ 客户端并将其转换为 OneBot 11 协议
@@ -8,6 +10,6 @@

-确保地址中 IP地址 是 LangBot 运行的主机的地址(若在同一网络内运行则为 127.0.0.1),端口必须与 LangBot 消息平台配置中的 aiocqhttp 适配器监听的端口相同,后缀必须为`/ws`:
+确保地址中 IP地址 是 LangBot 运行的主机的地址(若在同一网络内运行则为 127.0.0.1),端口必须与 LangBot 消息平台配置中的 `aiocqhttp 适配器`监听的端口相同,后缀必须为`/ws`:
接下来请阅读[填写配置信息](/deploy/quick-config/config)。
diff --git a/docs/deploy/platforms/aiocqhttp/napcat.md b/docs/deploy/platforms/qq/aiocqhttp/napcat.md
similarity index 92%
rename from docs/deploy/platforms/aiocqhttp/napcat.md
rename to docs/deploy/platforms/qq/aiocqhttp/napcat.md
index ca41d2666..76d5c913c 100644
--- a/docs/deploy/platforms/aiocqhttp/napcat.md
+++ b/docs/deploy/platforms/qq/aiocqhttp/napcat.md
@@ -1,5 +1,7 @@
# 部署消息平台 NapCat
+通过 OneBot 11 协议接入,需选择使用`aiocqhttp`作为适配器。
+
## NapCat安装教程
按照 [NapCat 官方文档安装](https://napcat.napneko.icu/guide/start-install)
diff --git a/docs/deploy/platforms/aiocqhttp/shamrock.md b/docs/deploy/platforms/qq/aiocqhttp/shamrock.md
similarity index 100%
rename from docs/deploy/platforms/aiocqhttp/shamrock.md
rename to docs/deploy/platforms/qq/aiocqhttp/shamrock.md
diff --git a/docs/deploy/platforms/gocq.md b/docs/deploy/platforms/qq/gocq.md
similarity index 100%
rename from docs/deploy/platforms/gocq.md
rename to docs/deploy/platforms/qq/gocq.md
diff --git a/docs/deploy/platforms/mirai.md b/docs/deploy/platforms/qq/mirai.md
similarity index 100%
rename from docs/deploy/platforms/mirai.md
rename to docs/deploy/platforms/qq/mirai.md
diff --git a/docs/deploy/platforms/official.md b/docs/deploy/platforms/qq/official.md
similarity index 100%
rename from docs/deploy/platforms/official.md
rename to docs/deploy/platforms/qq/official.md
diff --git a/docs/deploy/platforms/readme.md b/docs/deploy/platforms/readme.md
new file mode 100644
index 000000000..a9c874a31
--- /dev/null
+++ b/docs/deploy/platforms/readme.md
@@ -0,0 +1,10 @@
+# 消息平台说明
+
+LangBot 需要连接消息平台 API 才能与用户交互,目前支持以下消息平台:
+
+
+| 平台 | 状态 | 备注 |教程 |
+| ------ | ---- | ---- | ---- |
+| QQ 个人号 | ✅ | 使用普通的 QQ 号作为机器人,需要使用独立的协议端,支持 OneBot v11 和 go-cqhttp 协议 | [NapCat](/deploy/platforms/qq/aiocqhttp/napcat)
[Lagrange](/deploy/platforms/qq/aiocqhttp/lagrange)
[LiteLoaderQQNT](/deploy/platforms/qq/aiocqhttp/llonebot)
[Shamrock(不推荐)](/deploy/platforms/qq/aiocqhttp/shamrock)
[go-cqhttp(不推荐)](/deploy/platforms/qq/gocq) |
+| QQ 官方机器人 | ✅ | 接入 QQ 开放平台的机器人 API | [教程](/deploy/platforms/qq/official) |
+| 企业微信 | ✅ | 企业内部机器人 | [教程](/deploy/platforms/wecom/wecom) |
diff --git a/docs/deploy/platforms/wecom/wecom.md b/docs/deploy/platforms/wecom/wecom.md
new file mode 100644
index 000000000..0c2a12de8
--- /dev/null
+++ b/docs/deploy/platforms/wecom/wecom.md
@@ -0,0 +1,51 @@
+# 部署企业微信机器人
+
+部署企业微信机器人接入LangBot,在进行部署时,务必保证**LangBot在运行中**。
+
+## 创建机器人
+
+进入[企业微信管理后台](https://work.weixin.qq.com/),登陆账号,进入主页面后,点击` 应用管理 `,` 自建 `,` 创建应用 `,填写机器人基本信息,创建好之后,会出现类似这样的界面:
+
+
+## 设置回调地址
+
+点击` 接收消息 `,` 设置API接收 `,开始填写接收服务器消息配置。
+
+URL填写为` http://your_ip_address:2290/callback/command `,你的IP地址就是部署LangBot的服务器的地址。
+
+Token 和 EncodingAESKey 点击随机获取,并记录下来,之后填写配置项时会用到。
+
+## 保存回调地址
+点击保存,如果以上的 URL 填写正确,那么可以保存成功,这意味着企业微信和 LangBot 可以进行通信,如果出现**openapi请求回调地址不通过**,请再三检查你的URL填写是否正确。
+
+## 企业微信配置项
+
+1.打开企业微信管理后台主页,点击`我的企业`,记录下最下面的企业ID。
+
+
+
+2.首先开启通讯录同步权限
+
+
+
+点击`安全与管理`,`管理工具`,`通讯录同步`
+
+
+
+点击`查看secret`,记录下来。
+
+3.点击`应用管理`,找到刚才创建的机器人,查看机器人的secret,记录下来。
+
+
+
+至此,已经获得了五个配置项,分别是 Token,EncodingAESKey,corpid(企业ID),secret,contacts_secret(通讯录同步 secret)。
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/deploy/quick-config/config.md b/docs/deploy/quick-config/config.md
index 9d884d16f..d58f97152 100644
--- a/docs/deploy/quick-config/config.md
+++ b/docs/deploy/quick-config/config.md
@@ -99,6 +99,33 @@
`token`:验证密钥,,与`go-cqhttp`的`config.yml`里面的保持一致
+### 企业微信适配器
+
+用于接入企业微信,如果不清楚这些内容应该填写什么,请查看[企业微信配置项](/deploy/platforms/wecom.md#企业微信配置项)。
+
+```json
+{
+ "adapter": "wecom",
+ "enable": false,
+ "host": "0.0.0.0",
+ "port": 2290,
+ "corpid": "",
+ "secret": "",
+ "token": "",
+ "EncodingAESKey": "",
+ "contacts_secret": ""
+},
+```
+`"adapter": "wecom"`,无需改动。
+
+`enable`:是否启用,配置完成后请将其设为`true`
+
+`host`:运行 企业微信回调地址 的主机地址,一般不改动
+
+`port`:运行 企业微信回调地址 的监听端口,一般不改动
+
+`corpid`,`secret`,`token`,`EncodingAESKey`,`contacts_secret`都在企业微信配置项页中获取。
+
## provider.json
修改此配置文件以设置所连接的 AI 提供商的相关信息,目前支持 `openai(GPT)`, `anthropic(claude)`, `moonshot(月之暗面)` 三种接口及对应模型。
@@ -149,4 +176,4 @@
阅读并完成以上教程后,请根据你部署 LangBot 的方式重启,你应该可以成功使用了,如果不能请再次阅读(你或许漏做或错做某些步骤),如果完全阅读并充分理解本文档后仍然确实无法使用,你可以在[这里](/insight/community.html)找到交流群。
-:::
\ No newline at end of file
+:::
diff --git a/docs/index.md b/docs/index.md
index 8f676351e..bccf818a0 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -8,7 +8,7 @@ hero:
src: /langbot-logo-block.png
alt: LangBot-logo
text: ""
- tagline: "原名 QChatGPT;😎高稳定、🧩支持插件、🦄多模态的 LLM QQ / QQ频道 / OneBot 机器人 / Agent 平台"
+ tagline: "😎高稳定、🧩支持插件、🦄多模态 - 大模型原生即时通信机器人平台"
actions:
- theme: brand
text: 查看文档
diff --git a/docs/plugin/dev/messages.md b/docs/plugin/dev/messages.md
index 35a590877..6b304d85a 100644
--- a/docs/plugin/dev/messages.md
+++ b/docs/plugin/dev/messages.md
@@ -1,4 +1,4 @@
-# 消息平台实体
+# 消息实体
:::info 目录
[[toc]]