Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added source/images/knowledge-base/image-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/knowledge-base/image-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/knowledge-base/image-12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/images/knowledge-base/image-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/knowledge-base/image-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/knowledge-base/image-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/knowledge-base/image-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/knowledge-base/image-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/knowledge-base/image-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/knowledge-base/image-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/knowledge-base/image-9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 38 additions & 10 deletions zh/use/knowledge-base.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,41 @@ AstrBot 支持多知识库管理。在聊天时,您可以**自由指定知识

## 附录 2:免费的嵌入模型申请

### PPIO 派欧云

1. 打开 [PPIO 派欧云官网](https://ppio.cn/user/register?invited_by=AIOONE),并注册账户(通过此链接注册的账户将会获得 15 元人民币的代金券)。
2. 进入 [模型广场](https://ppio.cn/model-api/console),点击嵌入模型
3. 点击 BAAI:BGE-M3 (截止至 2025-06-02,该模型在该平台免费)。
4. 找到 API 接入指南,申请 Key。
5. 填写 AstrBot OpenAI Embedding 模型提供商配置:
1. API Key 为刚刚申请的 PPIO 的 API Key
2. embedding api base 填写 `https://api.ppinfra.com/v3/openai`
3. model 填写你选择的模型,此例子中为 `baai/bge-m3`。
### 硅基流动

截至2025/11/1 硅基流动的`BAAI/bge-m3`还是免费的
[硅基流动官网](https://siliconflow.cn/)
1. 注册账号
2. ![实名认证](../source/images/knowledge-base/image-2.png)过一下实名
3. 打开`Astrbot`,`模型提供商`,选择`新增模型提供商`
![新增模型提供商](../source/images/knowledge-base/image-3.png)
`嵌入(embedding)`,`OpenAI embedding`
![OpenAI embedding](../source/images/knowledge-base/image-4.png)
本教程我们主要需要关注
![1. API Key 2. API Base URL 3. 嵌入模型 4. 嵌入维度](../source/images/knowledge-base/image-5.png)
- API Key
- API Base URL
- 嵌入模型
- 嵌入维度
但是我们也需要关注
- ID: 这个可以随便填,用于区分不同的提供商
- 启用:一定要打开
4. 回到硅基流动官网,点击`模型广场`
点击`展开筛选器`,选择`嵌入模型`由于本篇讲的是免费模型,所以我们选择`免费`
选择`BAAI/bge-m3`,点击进入模型详情页
![筛选内容](../source/images/knowledge-base/image-6.png)
5. 复制`模型ID`,填入到`嵌入模型`中,另一个指向了`xxxx维`把这个数字填入到`嵌入维度`中(这正好是1024就不填了)
> 如果找不到可以使用自动获取试一试

![复制Model ID](../source/images/knowledge-base/image-7.png)
![Astrbot](../source/images/knowledge-base/image-8.png)<br>
6. 回到控制台获取`API Key`
点击`API密钥`
![apikey](../source/images/knowledge-base/image-9.png)
点击`创建API密钥`
![创建key](../source/images/knowledge-base/image-10.png)
描述信息用于确认密钥,随便填
然后复制密钥到`AstrBot`中
![复制key](../source/images/knowledge-base/image-11.png)
最后获取`API Base URL`,我直接给大家跳关填`https://api.siliconflow.cn/v1`
这样我们就完成了嵌入模型的配置![成果](../source/images/knowledge-base/image-12.png)