Skip to content

Commit

Permalink
Fix: pdf version (#853)
Browse files Browse the repository at this point in the history
* doc

* perf: mongo index

* perf: chat item index

* fix: packages
  • Loading branch information
c121914yu authored Feb 16, 2024
1 parent 91bcf8c commit bf7ee91
Show file tree
Hide file tree
Showing 14 changed files with 471 additions and 430 deletions.
7 changes: 2 additions & 5 deletions docSite/content/docs/development/sealos.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Sealos 的服务器在国外,不需要额外处理网络问题,无需服务

### 简介

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

![](/imgs/onSealos1.png)

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

![](/imgs/onsealos8.png)

### 管理后台

![](/imgs/onsealos9.png)

### 管理后台(已合并到plus)

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

Expand Down
5 changes: 1 addition & 4 deletions packages/service/core/chat/chatItemSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,8 @@ try {
close custom feedback;
*/
ChatItemSchema.index({ appId: 1, chatId: 1, dataId: 1 }, { background: true });
// admin charts
ChatItemSchema.index({ time: -1, obj: 1 }, { background: true });
ChatItemSchema.index({ userGoodFeedback: 1 }, { background: true });
ChatItemSchema.index({ userBadFeedback: 1 }, { background: true });
ChatItemSchema.index({ customFeedbacks: 1 }, { background: true });
ChatItemSchema.index({ adminFeedback: 1 }, { background: true });
} catch (error) {
console.log(error);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/service/core/chat/chatSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ try {
ChatSchema.index({ chatId: 1 }, { background: true });
// get user history
ChatSchema.index({ tmbId: 1, appId: 1, top: -1, updateTime: -1 }, { background: true });
// delete by appid; clear history; init chat; update chat; auth chat;
// delete by appid; clear history; init chat; update chat; auth chat; get chat;
ChatSchema.index({ appId: 1, chatId: 1 }, { background: true });

// get chat logs;
ChatSchema.index({ teamId: 1, appId: 1, updateTime: -1 }, { background: true });
// get share chat history
ChatSchema.index({ shareId: 1, outLinkUid: 1 }, { background: true });
ChatSchema.index({ shareId: 1, outLinkUid: 1, updateTime: -1, source: 1 }, { background: true });
} catch (error) {
console.log(error);
}
Expand Down
1 change: 1 addition & 0 deletions packages/service/core/chat/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const addCustomFeedbacks = async ({
try {
await MongoChatItem.findOneAndUpdate(
{
appId,
chatId,
dataId: chatItemId
},
Expand Down
3 changes: 1 addition & 2 deletions packages/service/core/dataset/training/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ try {
// lock training data; delete training data
TrainingDataSchema.index({ teamId: 1, collectionId: 1 });
// get training data and sort
TrainingDataSchema.index({ weight: -1 });
TrainingDataSchema.index({ lockTime: 1 });
TrainingDataSchema.index({ lockTime: 1, mode: 1, weight: -1 });
TrainingDataSchema.index({ expireAt: 1 }, { expireAfterSeconds: 7 * 24 * 60 * 60 }); // 7 days
} catch (error) {
console.log(error);
Expand Down
3 changes: 2 additions & 1 deletion packages/service/support/user/team/teamMemberSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ const TeamMemberSchema = new Schema({
});

try {
TeamMemberSchema.index({ teamId: 1 });
TeamMemberSchema.index({ teamId: 1 }, { background: true });
TeamMemberSchema.index({ userId: 1 }, { background: true });
} catch (error) {
console.log(error);
}
Expand Down
3 changes: 2 additions & 1 deletion packages/service/support/user/team/teamSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const TeamSchema = new Schema({
});

try {
// TeamSchema.index({ createTime: -1 });
TeamSchema.index({ name: 1 });
TeamSchema.index({ ownerId: 1 });
} catch (error) {
console.log(error);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"i18next": "^22.5.1",
"joplin-turndown-plugin-gfm": "^1.0.12",
"next-i18next": "^13.3.0",
"pdfjs-dist": "^4.0.269",
"pdfjs-dist": "4.0.269",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "^12.3.1",
Expand Down
Loading

0 comments on commit bf7ee91

Please sign in to comment.