Skip to content

Commit bf7ee91

Browse files
authored
Fix: pdf version (labring#853)
* doc * perf: mongo index * perf: chat item index * fix: packages
1 parent 91bcf8c commit bf7ee91

File tree

14 files changed

+471
-430
lines changed

14 files changed

+471
-430
lines changed

docSite/content/docs/development/sealos.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Sealos 的服务器在国外,不需要额外处理网络问题,无需服务
5757

5858
### 简介
5959

60-
FastGPT 商业版共包含了3个应用(fastgpt, fastgpt-plus, fastgpt-admin)和2个数据库,使用多 Api Key 时候需要安装 OneAPI(一个应用和一个数据库),总计4个应用和3个数据库
60+
FastGPT 商业版共包含了2个应用(fastgpt, fastgpt-plus)和2个数据库,使用多 Api Key 时候需要安装 OneAPI(一个应用和一个数据库),总计3个应用和3个数据库
6161

6262
![](/imgs/onSealos1.png)
6363

@@ -122,10 +122,7 @@ SYSTEM_FAVICON 可以是一个网络地址
122122

123123
![](/imgs/onsealos8.png)
124124

125-
### 管理后台
126-
127-
![](/imgs/onsealos9.png)
128-
125+
### 管理后台(已合并到plus)
129126

130127
### 商业版镜像配置文件
131128

packages/service/core/chat/chatItemSchema.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,8 @@ try {
9090
close custom feedback;
9191
*/
9292
ChatItemSchema.index({ appId: 1, chatId: 1, dataId: 1 }, { background: true });
93+
// admin charts
9394
ChatItemSchema.index({ time: -1, obj: 1 }, { background: true });
94-
ChatItemSchema.index({ userGoodFeedback: 1 }, { background: true });
95-
ChatItemSchema.index({ userBadFeedback: 1 }, { background: true });
96-
ChatItemSchema.index({ customFeedbacks: 1 }, { background: true });
97-
ChatItemSchema.index({ adminFeedback: 1 }, { background: true });
9895
} catch (error) {
9996
console.log(error);
10097
}

packages/service/core/chat/chatSchema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ try {
7676
ChatSchema.index({ chatId: 1 }, { background: true });
7777
// get user history
7878
ChatSchema.index({ tmbId: 1, appId: 1, top: -1, updateTime: -1 }, { background: true });
79-
// delete by appid; clear history; init chat; update chat; auth chat;
79+
// delete by appid; clear history; init chat; update chat; auth chat; get chat;
8080
ChatSchema.index({ appId: 1, chatId: 1 }, { background: true });
8181

8282
// get chat logs;
8383
ChatSchema.index({ teamId: 1, appId: 1, updateTime: -1 }, { background: true });
8484
// get share chat history
85-
ChatSchema.index({ shareId: 1, outLinkUid: 1 }, { background: true });
85+
ChatSchema.index({ shareId: 1, outLinkUid: 1, updateTime: -1, source: 1 }, { background: true });
8686
} catch (error) {
8787
console.log(error);
8888
}

packages/service/core/chat/controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export const addCustomFeedbacks = async ({
4343
try {
4444
await MongoChatItem.findOneAndUpdate(
4545
{
46+
appId,
4647
chatId,
4748
dataId: chatItemId
4849
},

packages/service/core/dataset/training/schema.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ try {
105105
// lock training data; delete training data
106106
TrainingDataSchema.index({ teamId: 1, collectionId: 1 });
107107
// get training data and sort
108-
TrainingDataSchema.index({ weight: -1 });
109-
TrainingDataSchema.index({ lockTime: 1 });
108+
TrainingDataSchema.index({ lockTime: 1, mode: 1, weight: -1 });
110109
TrainingDataSchema.index({ expireAt: 1 }, { expireAfterSeconds: 7 * 24 * 60 * 60 }); // 7 days
111110
} catch (error) {
112111
console.log(error);

packages/service/support/user/team/teamMemberSchema.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ const TeamMemberSchema = new Schema({
4343
});
4444

4545
try {
46-
TeamMemberSchema.index({ teamId: 1 });
46+
TeamMemberSchema.index({ teamId: 1 }, { background: true });
47+
TeamMemberSchema.index({ userId: 1 }, { background: true });
4748
} catch (error) {
4849
console.log(error);
4950
}

packages/service/support/user/team/teamSchema.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ const TeamSchema = new Schema({
4040
});
4141

4242
try {
43-
// TeamSchema.index({ createTime: -1 });
43+
TeamSchema.index({ name: 1 });
44+
TeamSchema.index({ ownerId: 1 });
4445
} catch (error) {
4546
console.log(error);
4647
}

packages/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"i18next": "^22.5.1",
1818
"joplin-turndown-plugin-gfm": "^1.0.12",
1919
"next-i18next": "^13.3.0",
20-
"pdfjs-dist": "^4.0.269",
20+
"pdfjs-dist": "4.0.269",
2121
"react": "18.2.0",
2222
"react-dom": "18.2.0",
2323
"react-i18next": "^12.3.1",

0 commit comments

Comments
 (0)