Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
43f30b37
authored
Mar 06, 2025
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc
parent
3ddbb376
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
158 additions
and
38 deletions
+158
-38
deploy/docker/docker-compose-milvus.yml
+2
-4
deploy/docker/docker-compose-pgvector.yml
+4
-6
deploy/docker/docker-compose-zilliz.yml
+2
-4
docSite/content/zh-cn/docs/development/upgrading/490.md
+133
-2
projects/app/src/pageComponents/dataset/detail/Import/commonProgress/DataProcess.tsx
+17
-22
No files found.
deploy/docker/docker-compose-milvus.yml
View file @
43f30b37
...
@@ -181,8 +181,6 @@ services:
...
@@ -181,8 +181,6 @@ services:
depends_on
:
depends_on
:
aiproxy_pg
:
aiproxy_pg
:
condition
:
service_healthy
condition
:
service_healthy
ports
:
-
'
3002:3000'
networks
:
networks
:
-
fastgpt
-
fastgpt
environment
:
environment
:
...
@@ -204,8 +202,8 @@ services:
...
@@ -204,8 +202,8 @@ services:
timeout
:
5s
timeout
:
5s
retries
:
10
retries
:
10
aiproxy_pg
:
aiproxy_pg
:
#
image: pgvector/pgvector:0.8.0-pg15 # docker hub
image
:
pgvector/pgvector:0.8.0-pg15
# docker hub
image
:
registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15
# 阿里云
#
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
restart
:
unless-stopped
restart
:
unless-stopped
container_name
:
aiproxy_pg
container_name
:
aiproxy_pg
volumes
:
volumes
:
...
...
deploy/docker/docker-compose-pgvector.yml
View file @
43f30b37
...
@@ -28,8 +28,8 @@ services:
...
@@ -28,8 +28,8 @@ services:
# image: mongo:4.4.29 # cpu不支持AVX时候使用
# image: mongo:4.4.29 # cpu不支持AVX时候使用
container_name
:
mongo
container_name
:
mongo
restart
:
always
restart
:
always
ports
:
#
ports:
-
27017:27017
#
- 27017:27017
networks
:
networks
:
-
fastgpt
-
fastgpt
command
:
mongod --keyFile /data/mongodb.key --replSet rs0
command
:
mongod --keyFile /data/mongodb.key --replSet rs0
...
@@ -138,8 +138,6 @@ services:
...
@@ -138,8 +138,6 @@ services:
depends_on
:
depends_on
:
aiproxy_pg
:
aiproxy_pg
:
condition
:
service_healthy
condition
:
service_healthy
ports
:
-
'
3002:3000'
networks
:
networks
:
-
fastgpt
-
fastgpt
environment
:
environment
:
...
@@ -161,8 +159,8 @@ services:
...
@@ -161,8 +159,8 @@ services:
timeout
:
5s
timeout
:
5s
retries
:
10
retries
:
10
aiproxy_pg
:
aiproxy_pg
:
#
image: pgvector/pgvector:0.8.0-pg15 # docker hub
image
:
pgvector/pgvector:0.8.0-pg15
# docker hub
image
:
registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15
# 阿里云
#
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
restart
:
unless-stopped
restart
:
unless-stopped
container_name
:
aiproxy_pg
container_name
:
aiproxy_pg
volumes
:
volumes
:
...
...
deploy/docker/docker-compose-zilliz.yml
View file @
43f30b37
...
@@ -119,8 +119,6 @@ services:
...
@@ -119,8 +119,6 @@ services:
depends_on
:
depends_on
:
aiproxy_pg
:
aiproxy_pg
:
condition
:
service_healthy
condition
:
service_healthy
ports
:
-
'
3002:3000'
networks
:
networks
:
-
fastgpt
-
fastgpt
environment
:
environment
:
...
@@ -142,8 +140,8 @@ services:
...
@@ -142,8 +140,8 @@ services:
timeout
:
5s
timeout
:
5s
retries
:
10
retries
:
10
aiproxy_pg
:
aiproxy_pg
:
#
image: pgvector/pgvector:0.8.0-pg15 # docker hub
image
:
pgvector/pgvector:0.8.0-pg15
# docker hub
image
:
registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15
# 阿里云
#
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
restart
:
unless-stopped
restart
:
unless-stopped
container_name
:
aiproxy_pg
container_name
:
aiproxy_pg
volumes
:
volumes
:
...
...
docSite/content/zh-cn/docs/development/upgrading/490.md
View file @
43f30b37
...
@@ -14,7 +14,138 @@ weight: 801
...
@@ -14,7 +14,138 @@ weight: 801
### 2. 更新镜像
### 2. 更新镜像
### 3. 运行升级脚本
-
更新 FastGPT 镜像 tag: v4.9.0-alpha
-
更新 FastGPT 商业版镜像 tag: v4.9.0-alpha
-
Sandbox 镜像,可以不更新
### 3. 替换 OneAPI(可选)
如果需要使用 AI Proxy 替换 OneAPI 的用户可执行该步骤。
#### 1. 修改 yml 文件
参考
[
最新的 yml
](
https://raw.githubusercontent.com/labring/FastGPT/main/deploy/docker/docker-compose-pgvector.yml
)
文件。里面已移除 OneAPI 并添加了 AIProxy配置。包含一个服务和一个 PgSQL 数据库。将
`aiproxy`
的配置
`追加`
到 OneAPI 的配置后面(先不要删除 OneAPI,有一个初始化会自动同步 OneAPI 的配置)
{{% details title="AI Proxy Yml 配置" closed="true" %}}
```
# AI Proxy
aiproxy:
image: 'ghcr.io/labring/sealos-aiproxy-service:latest'
container_name: aiproxy
restart: unless-stopped
depends_on:
aiproxy_pg:
condition: service_healthy
networks:
- fastgpt
environment:
# 对应 fastgpt 里的AIPROXY_API_TOKEN
- ADMIN_KEY=aiproxy
# 错误日志详情保存时间(小时)
- LOG_DETAIL_STORAGE_HOURS=1
# 数据库连接地址
- SQL_DSN=postgres://postgres:aiproxy@aiproxy_pg:5432/aiproxy
# 最大重试次数
- RetryTimes=3
# 不需要计费
- BILLING_ENABLED=false
# 不需要严格检测模型
- DISABLE_MODEL_CONFIG=true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api/status']
interval: 5s
timeout: 5s
retries: 10
aiproxy_pg:
image: pgvector/pgvector:0.8.0-pg15 # docker hub
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.8.0-pg15 # 阿里云
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
networks:
- fastgpt
environment:
TZ: Asia/Shanghai
POSTGRES_USER: postgres
POSTGRES_DB: aiproxy
POSTGRES_PASSWORD: aiproxy
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'aiproxy']
interval: 5s
timeout: 5s
retries: 10
```
{{% /details %}}
#### 2. 增加 FastGPT 环境变量:
修改 yml 文件中,fastgpt 容器的环境变量:
```
# AI Proxy 的地址,如果配了该地址,优先使用
- AIPROXY_API_ENDPOINT=http://aiproxy:3000
# AI Proxy 的 Admin Token,与 AI Proxy 中的环境变量 ADMIN_KEY
- AIPROXY_API_TOKEN=aiproxy
```
#### 3. 重载服务
`docker-compose down`
停止服务,然后
`docker-compose up -d`
启动服务,此时会追加
`aiproxy`
服务,并修改 FastGPT 的配置。
#### 4. 执行OneAPI迁移AI proxy脚本
-
可联网方案:
```
bash
# 进入 aiproxy 容器
docker
exec
-it
aiproxy sh
# 安装 curl
apk add curl
# 执行脚本
curl
--location
--request
POST
'http://localhost:3000/api/channels/import/oneapi'
\
--header
'Authorization: Bearer aiproxy'
\
--header
'Content-Type: application/json'
\
--data-raw
'{
"dsn": "mysql://root:oneapimmysql@tcp(mysql:3306)/oneapi"
}'
# 返回 {"data":[],"success":true} 代表成功
```
-
无法联网时,可打开
`aiproxy`
的外网暴露端口,然后在本地执行脚本。
aiProxy 暴露端口:3003:3000,修改后重新
`docker-compose up -d`
启动服务。
```
bash
# 在终端执行脚本
curl
--location
--request
POST
'http://localhost:3003/api/channels/import/oneapi'
\
--header
'Authorization: Bearer aiproxy'
\
--header
'Content-Type: application/json'
\
--data-raw
'{
"dsn": "mysql://root:oneapimmysql@tcp(mysql:3306)/oneapi"
}'
# 返回 {"data":[],"success":true} 代表成功
```
-
如果不熟悉 docker 操作,建议不要走脚本迁移,直接删除 OneAPI 所有内容,然后手动重新添加渠道。
#### 5. 进入 FastGPT 检查`AI Proxy` 服务是否正常启动。
登录 root 账号后,在
`账号-模型提供商`
页面,可以看到多出了
`模型渠道`
和
`调用日志`
两个选项,打开模型渠道,可以看到之前 OneAPI 的渠道,说明迁移完成,此时可以手动再检查下渠道是否正常。
#### 6. 删除 OneAPI 服务
```
bash
# 停止服务,或者针对性停止 OneAPI 和其 Mysql
docker-compose down
# yml 文件中删除 OneAPI 和其 Mysql 依赖
# 重启服务
docker-compose up
-d
```
### 4. 运行 FastGPT 升级脚本
从任意终端,发起 1 个 HTTP 请求。其中 {{rootkey}} 替换成环境变量里的
`rootkey`
;{{host}} 替换成
**FastGPT 域名**
。
从任意终端,发起 1 个 HTTP 请求。其中 {{rootkey}} 替换成环境变量里的
`rootkey`
;{{host}} 替换成
**FastGPT 域名**
。
...
@@ -28,7 +159,7 @@ curl --location --request POST 'https://{{host}}/api/admin/initv490' \
...
@@ -28,7 +159,7 @@ curl --location --request POST 'https://{{host}}/api/admin/initv490' \
1.
升级 PG Vector 插件版本
1.
升级 PG Vector 插件版本
2.
全量更新知识库集合字段。
2.
全量更新知识库集合字段。
3.
全量更新知识库数据中,index 的 type 类型。(时间较长)
3.
全量更新知识库数据中,index 的 type 类型。(时间较长
,最后可能提示 timeout,可忽略,数据库不崩都会一直增量执行
)
## 兼容 & 弃用
## 兼容 & 弃用
...
...
projects/app/src/pageComponents/dataset/detail/Import/commonProgress/DataProcess.tsx
View file @
43f30b37
...
@@ -159,34 +159,29 @@ function DataProcess() {
...
@@ -159,34 +159,29 @@ function DataProcess() {
gridTemplateColumns=
{
'repeat(2, 1fr)'
}
gridTemplateColumns=
{
'repeat(2, 1fr)'
}
/
>
/
>
</
Box
>
</
Box
>
{
trainingType
===
DatasetCollectionDataProcessModeEnum
.
chunk
&&
(
{
trainingType
===
DatasetCollectionDataProcessModeEnum
.
chunk
&&
feConfigs
?.
isPlus
&&
(
<
Box
mt=
{
6
}
>
<
Box
mt=
{
6
}
>
<
Box
fontSize=
{
'sm'
}
mb=
{
2
}
color=
{
'myGray.600'
}
>
<
Box
fontSize=
{
'sm'
}
mb=
{
2
}
color=
{
'myGray.600'
}
>
{
t
(
'dataset:enhanced_indexes'
)
}
{
t
(
'dataset:enhanced_indexes'
)
}
</
Box
>
</
Box
>
{
feConfigs
?.
isPlus
&&
(
<
HStack
gap=
{
[
3
,
7
]
}
>
<
HStack
gap=
{
[
3
,
7
]
}
>
<
HStack
flex=
{
'1'
}
spacing=
{
1
}
>
<
HStack
flex=
{
'1'
}
spacing=
{
1
}
>
<
Checkbox
{
...
register
('
autoIndexes
')}
>
<
Checkbox
{
...
register
('
autoIndexes
')}
>
<
FormLabel
>
{
t
(
'dataset:auto_indexes'
)
}
</
FormLabel
>
<
FormLabel
>
{
t
(
'dataset:auto_indexes'
)
}
</
FormLabel
>
</
Checkbox
>
<
QuestionTip
label=
{
t
(
'dataset:auto_indexes_tips'
)
}
/>
</
HStack
>
<
HStack
flex=
{
'1'
}
spacing=
{
1
}
>
<
MyTooltip
label=
{
!
datasetDetail
?.
vlmModel
?
t
(
'common:error_vlm_not_config'
)
:
''
}
>
<
Checkbox
isDisabled=
{
!
datasetDetail
?.
vlmModel
}
{
...
register
('
imageIndex
')}
>
<
FormLabel
>
{
t
(
'dataset:image_auto_parse'
)
}
</
FormLabel
>
</
Checkbox
>
</
Checkbox
>
<
QuestionTip
label=
{
t
(
'dataset:auto_indexes_tips'
)
}
/>
</
MyTooltip
>
</
HStack
>
<
QuestionTip
label=
{
t
(
'dataset:image_auto_parse_tips'
)
}
/>
<
HStack
flex=
{
'1'
}
spacing=
{
1
}
>
<
MyTooltip
label=
{
!
datasetDetail
?.
vlmModel
?
t
(
'common:error_vlm_not_config'
)
:
''
}
>
<
Checkbox
isDisabled=
{
!
datasetDetail
?.
vlmModel
}
{
...
register
('
imageIndex
')}
>
<
FormLabel
>
{
t
(
'dataset:image_auto_parse'
)
}
</
FormLabel
>
</
Checkbox
>
</
MyTooltip
>
<
QuestionTip
label=
{
t
(
'dataset:image_auto_parse_tips'
)
}
/>
</
HStack
>
</
HStack
>
</
HStack
>
)
}
</
HStack
>
</
Box
>
</
Box
>
)
}
)
}
<
Box
mt=
{
6
}
>
<
Box
mt=
{
6
}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment