Skip to content

Commit 1fbc407

Browse files
c121914yuUUUUnotfoundzhanghx0905newfish-cmyk
authored
4.7.1-alpha2 (labring#1153)
Co-authored-by: UUUUnotfound <[email protected]> Co-authored-by: Hexiao Zhang <[email protected]> Co-authored-by: heheer <[email protected]>
1 parent 3b0b2d6 commit 1fbc407

File tree

84 files changed

+1772
-714
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1772
-714
lines changed

.github/workflows/docs-image.yml .github/workflows/docs-deploy-kubeconfig.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build docs images and copy image to docker hub
1+
name: Deploy image by kubeconfig
22
on:
33
workflow_dispatch:
44
push:
@@ -68,7 +68,7 @@ jobs:
6868
tags: ${{ steps.meta.outputs.tags }}
6969
labels: ${{ steps.meta.outputs.labels }}
7070
outputs:
71-
tags: ${{ steps.datetime.outputs.datetime }}
71+
tags: ${{ steps.datetime.outputs.datetime }}
7272
update-docs-image:
7373
needs: build-fastgpt-docs-images
7474
runs-on: ubuntu-20.04
@@ -85,4 +85,4 @@ jobs:
8585
env:
8686
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
8787
with:
88-
args: annotate deployment/fastgpt-docs originImageName="registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALI_HUB_USERNAME }}/fastgpt-docs:${{ needs.build-fastgpt-docs-images.outputs.tags }}" --overwrite
88+
args: annotate deployment/fastgpt-docs originImageName="registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALI_HUB_USERNAME }}/fastgpt-docs:${{ needs.build-fastgpt-docs-images.outputs.tags }}" --overwrite

.github/workflows/docs-deploy.yml .github/workflows/docs-deploy-vercel.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: deploy-docs
1+
name: Deploy image to vercel
22

33
on:
44
workflow_dispatch:
@@ -47,7 +47,7 @@ jobs:
4747

4848
- name: Add cdn for images
4949
run: |
50-
sed -i "s#\](/imgs/#\](https://cdn.jsdelivr.us/gh/yangchuansheng/fastgpt-imgs@main/imgs/#g" $(grep -rl "\](/imgs/" docSite/content/docs)
50+
sed -i "s#\](/imgs/#\](https://cdn.jsdelivr.net/gh/yangchuansheng/fastgpt-imgs@main/imgs/#g" $(grep -rl "\](/imgs/" docSite/content/docs)
5151
5252
# Step 3 - Install Hugo (specific version)
5353
- name: Install Hugo

.github/workflows/docs-preview.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: preview-docs
1+
name: Preview FastGPT docs
22

33
on:
44
pull_request_target:
@@ -47,7 +47,7 @@ jobs:
4747

4848
- name: Add cdn for images
4949
run: |
50-
sed -i "s#\](/imgs/#\](https://cdn.jsdelivr.us/gh/yangchuansheng/fastgpt-imgs@main/imgs/#g" $(grep -rl "\](/imgs/" docSite/content/docs)
50+
sed -i "s#\](/imgs/#\](https://cdn.jsdelivr.net/gh/yangchuansheng/fastgpt-imgs@main/imgs/#g" $(grep -rl "\](/imgs/" docSite/content/docs)
5151
5252
# Step 3 - Install Hugo (specific version)
5353
- name: Install Hugo

.github/workflows/helm-release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Release helm chart
22

33
on:
44
push:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fastgpt.run 域名会弃用。
103103

104104
> [Sealos](https://sealos.io) 的服务器在国外,不需要额外处理网络问题,无需服务器、无需魔法、无需域名,支持高并发 & 动态伸缩。点击以下按钮即可一键部署 👇
105105
106-
[![](https://cdn.jsdelivr.us/gh/labring-actions/templates@main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dfastgpt)
106+
[![](https://cdn.jsdelivr.net/gh/labring-actions/templates@main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dfastgpt)
107107

108108
由于需要部署数据库,部署完后需要等待 2~4 分钟才能正常访问。默认用了最低配置,首次访问时会有些慢。相关使用教程可查看:[Sealos 部署 FastGPT](https://doc.fastgpt.in/docs/development/sealos/)
109109

README_en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Project tech stack: NextJs + TS + ChakraUI + Mongo + Postgres (Vector plugin)
106106

107107
- **⚡ Deployment**
108108

109-
[![](https://cdn.jsdelivr.us/gh/labring-actions/templates@main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dfastgpt)
109+
[![](https://cdn.jsdelivr.net/gh/labring-actions/templates@main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dfastgpt)
110110

111111
Give it a 2-4 minute wait after deployment as it sets up the database. Initially, it might be a tad slow since we're using the basic settings.
112112

README_ja.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409b
9494

9595
- **⚡ デプロイ**
9696

97-
[![](https://cdn.jsdelivr.us/gh/labring-actions/templates@main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dfastgpt)
97+
[![](https://cdn.jsdelivr.net/gh/labring-actions/templates@main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Dfastgpt)
9898

9999
デプロイ 後、データベースをセットアップするので、2~4分待 ってください。基本設定 を 使 っているので、最初 は 少 し 遅 いかもしれません。
100100

docSite/assets/imgs/laf1.webp

46.2 KB
Binary file not shown.

docSite/assets/imgs/laf2.webp

20.3 KB
Binary file not shown.

docSite/assets/imgs/laf3.webp

57.7 KB
Binary file not shown.

docSite/assets/imgs/laf4.webp

23.6 KB
Binary file not shown.

docSite/assets/imgs/rerank1.png

91.3 KB
Loading

docSite/content/docs/development/configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ llm模型全部合并
156156

157157
请使用 4.6.6-alpha 以上版本,配置文件中的 `reRankModels` 为重排模型,虽然是数组,不过目前仅有第1个生效。
158158

159-
1. [部署 ReRank 模型](/docs/development/custom-models/reranker/)
159+
1. [部署 ReRank 模型](/docs/development/custom-models/bge-rerank/)
160160
1. 找到 FastGPT 的配置文件中的 `reRankModels`, 4.6.6 以前是 `ReRankModels`
161161
2. 修改对应的值:(记得去掉注释)
162162

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
title: '接入 bge-rerank 重排模型'
3+
description: '接入 bge-rerank 重排模型'
4+
icon: 'sort'
5+
draft: false
6+
toc: true
7+
weight: 910
8+
---
9+
10+
## 不同模型推荐配置
11+
12+
推荐配置如下:
13+
14+
{{< table "table-hover table-striped-columns" >}}
15+
| 模型名 | 内存 | 显存 | 硬盘空间 | 启动命令 |
16+
|------|---------|---------|----------|--------------------------|
17+
| bge-rerank-base | >=4GB | >=4GB | >=8GB | python app.py |
18+
| bge-rerank-large | >=8GB | >=8GB | >=8GB | python app.py |
19+
| bge-rerank-v2-m3 | >=8GB | >=8GB | >=8GB | python app.py |
20+
{{< /table >}}
21+
22+
## 源码部署
23+
24+
### 1. 安装环境
25+
26+
- Python 3.9, 3.10
27+
- CUDA 11.7
28+
- 科学上网环境
29+
30+
### 2. 下载代码
31+
32+
3 个模型代码分别为:
33+
34+
1. [https://github.com/labring/FastGPT/tree/main/python/reranker/bge-reranker-base](https://github.com/labring/FastGPT/tree/main/python/reranker/bge-reranker-base)
35+
2. [https://github.com/labring/FastGPT/tree/main/python/reranker/bge-reranker-large](https://github.com/labring/FastGPT/tree/main/python/reranker/bge-reranker-large)
36+
3. [https://github.com/labring/FastGPT/tree/main/python/reranker/bge-rerank-v2-m3](https://github.com/labring/FastGPT/tree/main/python/reranker/bge-rerank-v2-m3)
37+
38+
### 3. 安装依赖
39+
40+
```sh
41+
pip install -r requirements.txt
42+
```
43+
44+
### 4. 下载模型
45+
46+
3个模型的 huggingface 仓库地址如下:
47+
48+
1. [https://huggingface.co/BAAI/bge-reranker-base](https://huggingface.co/BAAI/bge-reranker-base)
49+
2. [https://huggingface.co/BAAI/bge-reranker-large](https://huggingface.co/BAAI/bge-reranker-large)
50+
3. [https://huggingface.co/BAAI/bge-rerank-v2-m3](https://huggingface.co/BAAI/bge-rerank-v2-m3)
51+
52+
在对应代码目录下 clone 模型。目录结构:
53+
54+
```
55+
bge-reranker-base/
56+
app.py
57+
Dockerfile
58+
requirements.txt
59+
```
60+
61+
### 5. 运行代码
62+
63+
```bash
64+
python app.py
65+
```
66+
67+
启动成功后应该会显示如下地址:
68+
69+
![](/imgs/rerank1.png)
70+
71+
> 这里的 `http://0.0.0.0:6006` 就是连接地址。
72+
73+
## docker 部署
74+
75+
**镜像名分别为:**
76+
77+
1. registry.cn-hangzhou.aliyuncs.com/fastgpt/bge-rerank-base:v0.1 (4 GB+)
78+
2. registry.cn-hangzhou.aliyuncs.com/fastgpt/bge-rerank-large:v0.1 (5 GB+)
79+
3. registry.cn-hangzhou.aliyuncs.com/fastgpt/bge-rerank-v2-m3:v0.1 (5 GB+)
80+
81+
**端口**
82+
83+
6006
84+
85+
**环境变量**
86+
87+
```
88+
ACCESS_TOKEN=访问安全凭证,请求时,Authorization: Bearer ${ACCESS_TOKEN}
89+
```
90+
91+
**运行命令示例**
92+
93+
```sh
94+
# auth token 为mytoken
95+
docker run -d --name reranker -p 6006:6006 -e ACCESS_TOKEN=mytoken --gpus all registry.cn-hangzhou.aliyuncs.com/fastgpt/bge-rerank-base:v0.1
96+
```
97+
98+
**docker-compose.yml示例**
99+
```
100+
version: "3"
101+
services:
102+
reranker:
103+
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/rerank:v0.2
104+
container_name: reranker
105+
# GPU运行环境,如果宿主机未安装,将deploy配置隐藏即可
106+
deploy:
107+
resources:
108+
reservations:
109+
devices:
110+
- driver: nvidia
111+
count: all
112+
capabilities: [gpu]
113+
ports:
114+
- 6006:6006
115+
environment:
116+
- ACCESS_TOKEN=mytoken
117+
118+
```
119+
## 接入 FastGPT
120+
121+
参考 [ReRank模型接入](/docs/development/configuration/#rerank-接入),host 变量为部署的域名。

docSite/content/docs/development/custom-models/reranker.md

-90
This file was deleted.

docSite/content/docs/development/docker.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ FastGPT 使用了 one-api 项目来管理模型池,其可以兼容 OpenAI 、A
3232

3333
可选择 [Sealos 快速部署 OneAPI](/docs/development/one-api),更多部署方法可参考该项目的 [README](https://github.com/songquanpeng/one-api),也可以直接通过以下按钮一键部署:
3434

35-
<a href="https://template.cloud.sealos.io/deploy?templateName=one-api" rel="external" target="_blank"><img src="https://cdn.jsdelivr.us/gh/labring-actions/templates@main/Deploy-on-Sealos.svg" alt="Deploy on Sealos"/></a>
35+
<a href="https://template.cloud.sealos.io/deploy?templateName=one-api" rel="external" target="_blank"><img src="https://cdn.jsdelivr.net/gh/labring-actions/templates@main/Deploy-on-Sealos.svg" alt="Deploy on Sealos"/></a>
3636

3737
## 一、安装 Docker 和 docker-compose
3838

docSite/content/docs/development/one-api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ MySQL 版本支持多实例,高并发。
2929

3030
直接点击以下按钮即可一键部署 👇
3131

32-
<a href="https://template.cloud.sealos.io/deploy?templateName=one-api" rel="external" target="_blank"><img src="https://cdn.jsdelivr.us/gh/labring-actions/templates@main/Deploy-on-Sealos.svg" alt="Deploy on Sealos"/></a>
32+
<a href="https://template.cloud.sealos.io/deploy?templateName=one-api" rel="external" target="_blank"><img src="https://cdn.jsdelivr.net/gh/labring-actions/templates@main/Deploy-on-Sealos.svg" alt="Deploy on Sealos"/></a>
3333

3434
部署完后会跳转「应用管理」,数据库在另一个应用「数据库」中。需要等待 1~3 分钟数据库运行后才能访问成功。
3535

docSite/content/docs/development/sealos.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ FastGPT 使用了 one-api 项目来管理模型池,其可以兼容 OpenAI 、A
2121
## 一键部署
2222
Sealos 的服务器在国外,不需要额外处理网络问题,无需服务器、无需魔法、无需域名,支持高并发 & 动态伸缩。点击以下按钮即可一键部署 👇
2323

24-
<a href="https://template.cloud.sealos.io/deploy?templateName=fastgpt" rel="external" target="_blank"><img src="https://cdn.jsdelivr.us/gh/labring-actions/templates@main/Deploy-on-Sealos.svg" alt="Deploy on Sealos"/></a>
24+
<a href="https://template.cloud.sealos.io/deploy?templateName=fastgpt" rel="external" target="_blank"><img src="https://cdn.jsdelivr.net/gh/labring-actions/templates@main/Deploy-on-Sealos.svg" alt="Deploy on Sealos"/></a>
2525

2626
由于需要部署数据库,部署完后需要等待 2~4 分钟才能正常访问。默认用了最低配置,首次访问时会有些慢。
2727

docSite/content/docs/development/upgrading/47.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'V4.7'
2+
title: 'V4.7(需要初始化)'
33
description: 'FastGPT V4.7更新说明'
44
icon: 'upgrade'
55
draft: false
@@ -26,7 +26,7 @@ curl --location --request POST 'https://{{host}}/api/admin/initv47' \
2626

2727
## 3. 升级 ReRank 模型
2828

29-
4.7对ReRank模型进行了格式变动,兼容 cohere 的格式,可以直接使用 cohere 提供的 API。如果是本地的 ReRank 模型,需要修改镜像为:`registry.cn-hangzhou.aliyuncs.com/fastgpt/rerank:v0.2`
29+
4.7对ReRank模型进行了格式变动,兼容 cohere 的格式,可以直接使用 cohere 提供的 API。如果是本地的 ReRank 模型,需要修改镜像为:`registry.cn-hangzhou.aliyuncs.com/fastgpt/bge-rerank-base:v0.1`
3030

3131
cohere的重排模型对中文不是很好,感觉不如 bge 的好用,接入教程如下:
3232

docSite/content/docs/development/upgrading/471.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ curl --location --request POST 'https://{{host}}/api/admin/clearInvalidData' \
2121

2222
## V4.7.1 更新说明
2323

24-
1. 新增 - Pptx 和 xlsx 文件读取。但所有文件读取都放服务端,会消耗更多的服务器资源,以及无法在上传时预览更多内容。
25-
2. 新增 - 集成 Laf 云函数,可以读取 Laf 账号中的云函数作为 HTTP 模块。
26-
3. 新增 - 定时器,清理垃圾数据。(采用小范围清理,会清理最近n个小时的,所以请保证服务持续运行,长时间不允许,可以继续执行 clearInvalidData 的接口进行全量清理。)
27-
4. 商业版新增 - 后台配置系统通知。
28-
5. 修改 - csv导入模板,取消 header 校验,自动获取前两列。
29-
6. 修复 - 工具调用模块连线数据类型校验错误。
30-
7. 修复 - 自定义索引输入时,解构数据失败。
31-
8. 修复 - rerank 模型数据格式。
24+
1. 新增 - 语音输入完整配置。支持选择是否打开语音输入(包括分享页面),支持语音输入后自动发送,支持语音输入后自动语音播放(流式)。
25+
2. 新增 - Pptx 和 xlsx 文件读取。但所有文件读取都放服务端,会消耗更多的服务器资源,以及无法在上传时预览更多内容。
26+
3. 新增 - 集成 Laf 云函数,可以读取 Laf 账号中的云函数作为 HTTP 模块。
27+
4. 新增 - 定时器,清理垃圾数据。(采用小范围清理,会清理最近n个小时的,所以请保证服务持续运行,长时间不允许,可以继续执行 clearInvalidData 的接口进行全量清理。)
28+
5. 商业版新增 - 后台配置系统通知。
29+
6. 修改 - csv导入模板,取消 header 校验,自动获取前两列。
30+
7. 修复 - 工具调用模块连线数据类型校验错误。
31+
8. 修复 - 自定义索引输入时,解构数据失败。
32+
9. 修复 - rerank 模型数据格式。
33+
10. 修复 - 问题补全历史记录BUG

0 commit comments

Comments
 (0)