Skip to content

Commit 59fd943

Browse files
authored
fix: session (#1455)
* fix: session * doc * fix: i188n
1 parent ee8cb09 commit 59fd943

File tree

6 files changed

+27
-15
lines changed

6 files changed

+27
-15
lines changed

docSite/content/docs/development/docker.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,13 @@ PG 数据库没有连接上/初始化失败,可以查看日志。FastGPT 会
257257
2. 非 docker 部署的,需要手动安装 pg vector 插件
258258
3. 查看 fastgpt 日志,有没有相关报错
259259
260+
### Illegal instruction
261+
262+
可能原因:
263+
264+
1. arm架构。需要使用 Mongo 官方镜像: mongo:5.0.18
265+
2. cpu 不支持 AVX,无法用 mongo5,需要换成 mongo4.x。把 mongo 的 image 换成: mongo:4.4.29
266+
260267
### Operation `auth_codes.findOne()` buffering timed out after 10000ms
261268
262269
mongo连接失败,查看mongo的运行状态对应日志。

files/deploy/fastgpt/docker-compose.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# 数据库的默认账号和密码仅首次运行时设置有效
22
# 如果修改了账号密码,记得改数据库和项目连接参数,别只改一处~
33
# 该配置文件只是给快速启动,测试使用。正式使用,记得务必修改账号密码,以及调整合适的知识库参数,共享内存等。
4+
# 如何无法访问 dockerhub 和 git,可以用阿里云(阿里云没有arm包)
45

56
version: '3.3'
67
services:
78
pg:
8-
# image: pgvector/pgvector:0.7.0-pg15 # docker hub
9-
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.7.0 # 阿里云
9+
image: pgvector/pgvector:0.7.0-pg15 # docker hub
10+
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.7.0 # 阿里云
1011
container_name: pg
1112
restart: always
1213
ports: # 生产环境建议不要暴露
@@ -21,7 +22,9 @@ services:
2122
volumes:
2223
- ./pg/data:/var/lib/postgresql/data
2324
mongo:
24-
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18
25+
image: mongo:5.0.18 # dockerhub
26+
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 # 阿里云
27+
# image: mongo:4.4.29 # cpu不支持AVX时候使用
2528
container_name: mongo
2629
restart: always
2730
ports:
@@ -66,8 +69,8 @@ services:
6669
wait $$!
6770
fastgpt:
6871
container_name: fastgpt
69-
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.7 # git
70-
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.7 # 阿里云
72+
image: ghcr.io/labring/fastgpt:v4.8 # git
73+
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8 # 阿里云
7174
ports:
7275
- 3000:3000
7376
networks:

packages/service/common/mongo/sessionRun.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ export const mongoSessionRun = async <T = unknown>(fn: (session: ClientSession)
88
const result = await fn(session);
99

1010
await session.commitTransaction();
11-
session.endSession();
11+
await session.endSession();
1212

1313
return result as T;
1414
} catch (error) {
1515
console.log(error);
1616

1717
await session.abortTransaction();
18-
session.endSession();
18+
await session.endSession();
1919
return Promise.reject(error);
2020
}
2121
};

projects/app/i18n/en/common.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"App": "App",
33
"Export": "Export",
44
"Folder": "Folder",
5+
"Login": "Login",
56
"Move": "Move",
67
"Name": "Name",
8+
"New Create": "Create New",
79
"Rename": "Rename",
810
"Running": "Running",
911
"UnKnow": "Unknown",
1012
"Warning": "Warning",
11-
"New Create": "Create New",
12-
1313
"common": {
1414
"Action": "Action",
1515
"Add": "Add",
@@ -580,7 +580,8 @@
580580
"success": "Start syncing"
581581
}
582582
},
583-
"training": {}
583+
"training": {
584+
}
584585
},
585586
"data": {
586587
"Auxiliary Data": "Auxiliary data",
@@ -863,10 +864,10 @@
863864
"params": "Params"
864865
},
865866
"input": {
867+
"Add Branch": "Add branch",
866868
"Add Input": "Add input",
867869
"Input Number": "Input: {{length}}",
868870
"add": "Add condition",
869-
"Add Branch": "Add branch",
870871
"description": {
871872
"Background": "You can add some specific content introductions to better identify the user's question type. This content is usually to introduce something unknown to the model.",
872873
"HTTP Dynamic Input": "Receives the output value of the previous node as a variable, which can be used by HTTP request parameters.",

projects/app/i18n/zh/common.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"App": "应用",
33
"Export": "导出",
44
"Folder": "文件夹",
5+
"Login": "登录",
56
"Move": "移动",
67
"Name": "名称",
8+
"New Create": "新建",
79
"Rename": "重命名",
810
"Running": "运行中",
911
"UnKnow": "未知",
1012
"Warning": "提示",
11-
"New Create": "新建",
12-
1313
"common": {
1414
"Action": "操作",
1515
"Add": "添加",
@@ -580,7 +580,8 @@
580580
"success": "开始同步"
581581
}
582582
},
583-
"training": {}
583+
"training": {
584+
}
584585
},
585586
"data": {
586587
"Auxiliary Data": "辅助数据",

projects/app/src/pages/login/components/LoginForm/LoginForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => {
137137
isLoading={requesting}
138138
onClick={handleSubmit(onclickLogin)}
139139
>
140-
{t('home.Login')}
140+
{t('Login')}
141141
</Button>
142142

143143
{feConfigs?.show_register && (

0 commit comments

Comments
 (0)