diff --git a/.vitepress/config.mjs b/.vitepress/config.mjs index f8b6bde..33a9480 100644 --- a/.vitepress/config.mjs +++ b/.vitepress/config.mjs @@ -109,6 +109,21 @@ export default defineConfig({ }, ] }, + { + text: '其他', + base: '/others', + collapsed: false, + items: [ + { + text: '接入 OneAPI', + link: '/oneapi' + }, + { + text: "自部署文转图", + link: '/self-host-t2i' + } + ] + }, ], socialLinks: [ diff --git a/community.md b/community.md new file mode 100644 index 0000000..1b532ad --- /dev/null +++ b/community.md @@ -0,0 +1,16 @@ +# 社区 + +本文档可能没有完全覆盖所有的功能,如果你有任何问题或者建议,或者发现了 AstrBot 或者是本文档的问题,欢迎通过下面的社区渠道联系我。 + +## QQ 群 + +欢迎加群讨论:[322154837](https://qm.qq.com/cgi-bin/qm/qr?k=EYGsuUTfe00_iOu9JTXS7_TEpMkXOvwv&jump_from=webapi&authKey=uUEMKCROfsseS+8IzqPjzV3y1tzy4AkykwTib2jNkOFdzezF9s9XknqnIaf3CDft) + + +## GitHub + +欢迎提交 Issue 或 Pull Request: + +[Soulter/AstrBot](https://github.com/Soulter/AstrBot) + +[Soulter/AstrBot-Docs](https://github.com/Soulter/AstrBot-docs) \ No newline at end of file diff --git a/others/oneapi.md b/others/oneapi.md new file mode 100644 index 0000000..b9094e4 --- /dev/null +++ b/others/oneapi.md @@ -0,0 +1,64 @@ +# 接入 OneAPI + +OneAPI 使得我们能通过标准的 OpenAI API 格式访问全球几乎所有厂商的所有大模型,并且做到了开箱即用。 + +``` + OpenAI ChatGPT 系列模型(支持 Azure OpenAI API) + Anthropic Claude 系列模型 (支持 AWS Claude) + Google PaLM2/Gemini 系列模型 + Mistral 系列模型 + 字节跳动豆包大模型 + 百度文心一言系列模型 + 阿里通义千问系列模型 + 讯飞星火认知大模型 + 智谱 ChatGLM 系列模型 + 360 智脑 + 腾讯混元大模型 + Moonshot AI + 百川大模型 + MINIMAX + Groq + Ollama + 零一万物 + 阶跃星辰 + Coze + Cohere + DeepSeek + Cloudflare Workers AI + DeepL + together.ai + novita.ai +``` + +它是一个开源项目,你可以在 [这里](https://github.com/songquanpeng/one-api) 找到它。 + +## 部署 OneAPI + +请参阅 [OneAPI 部署文档](https://github.com/songquanpeng/one-api?tab=readme-ov-file#%E9%83%A8%E7%BD%B2)。 + +> [!TIP] +> 使用 Docker 部署非常方便。 + +在部署完之后,打开 OneAPI 后台面板(如果你没改端口,端口默认是 3000),使用默认账户`root` 密码 `123456` 登录管理员账号。 + +然后,点击渠道,添加相关信息。 + +![](image-1.png) + +> [!TIP] +> 如果对应的渠道需要代理,请在下面添加代理。 + +添加成功后,点击 `令牌`,添加一个令牌。模型范围需要选择刚刚添加的渠道。 + +添加成功后,再次点击 `令牌`,点击 `复制`。如果复制失败,请手动复制。 + +> [!TIP] +> 请关注你创建好的令牌的剩余额度。 + +接着,打开 AstrBot 可视化面板,点击 `配置` -> `大语言模型` 添加一个 `OpenAI` 类型。 + +![](../source/images/oneapi/image.png) + +修改 API Base URL: `http://localhost:3000/v1`。(如果你在云服务器上部署了 OneAPI,那么请填写你的公网地址) + +模型填写你所添加的模型名称,比如 `gpt-4o-mini`. \ No newline at end of file diff --git a/others/self-host-t2i.md b/others/self-host-t2i.md new file mode 100644 index 0000000..0365f4c --- /dev/null +++ b/others/self-host-t2i.md @@ -0,0 +1,24 @@ +# 自行部署文转图服务 + +在 AstrBot 中,默认使用的文转图服务接口是 + +```plain +https://t2i.soulter.top/text2img +``` + +此接口能够保障大部分时间正常响应。但是由于部署在国外的(纽约)服务器,因此响应速度可能会比较慢。 + +可以自行部署文转图服务。 + +文转图服务使用的开源项目:https://github.com/idoknow/CampuxUtility + +``` +docker run -itd -p 8999:8999 rockchin/campuxutility +``` + +> 上述 8999 端口可以自行更改。 + +在部署完成后,前往 AstrBot 面板 -> 配置 -> 其他配置,修改`文本转图像服务接口` 为你部署好的 url。 + +> 如果部署在与 AstrBot 相同的机器上,url 应该为 `http://localhost:8999`。 + diff --git a/source/images/oneapi/image.png b/source/images/oneapi/image.png new file mode 100644 index 0000000..34b99da Binary files /dev/null and b/source/images/oneapi/image.png differ