mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
Fix: pdf version (#853)
* doc * perf: mongo index * perf: chat item index * fix: packages
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -43,6 +43,7 @@ export const addCustomFeedbacks = async ({
|
||||
try {
|
||||
await MongoChatItem.findOneAndUpdate(
|
||||
{
|
||||
appId,
|
||||
chatId,
|
||||
dataId: chatItemId
|
||||
},
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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",
|
||||
|
Reference in New Issue
Block a user