Fix: pdf version (#853)

* doc

* perf: mongo index

* perf: chat item index

* fix: packages
This commit is contained in:
Archer
2024-02-16 12:19:05 +08:00
committed by GitHub
parent 91bcf8c53e
commit bf7ee919b6
14 changed files with 471 additions and 430 deletions

View File

@@ -8,7 +8,6 @@ import { authApp } from '@fastgpt/service/support/permission/auth/app';
import { MongoChatItem } from '@fastgpt/service/core/chat/chatItemSchema';
import { mongoSessionRun } from '@fastgpt/service/common/mongo/sessionRun';
/* 获取我的模型 */
export default async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
try {
await connectToDatabase();

View File

@@ -27,8 +27,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const { tmbId } = await authCert({ req, authToken: true });
return {
appId,
tmbId,
appId,
source: ChatSourceEnum.online
};
}

View File

@@ -36,8 +36,8 @@ export async function generateQA(): Promise<any> {
try {
const data = await MongoDatasetTraining.findOneAndUpdate(
{
mode: TrainingModeEnum.qa,
lockTime: { $lte: new Date(Date.now() - 6 * 60 * 1000) }
lockTime: { $lte: new Date(Date.now() - 6 * 60 * 1000) },
mode: TrainingModeEnum.qa
},
{
lockTime: new Date()

View File

@@ -32,8 +32,8 @@ export async function generateVector(): Promise<any> {
try {
const data = await MongoDatasetTraining.findOneAndUpdate(
{
mode: TrainingModeEnum.chunk,
lockTime: { $lte: new Date(Date.now() - 1 * 60 * 1000) }
lockTime: { $lte: new Date(Date.now() - 1 * 60 * 1000) },
mode: TrainingModeEnum.chunk
},
{
lockTime: new Date()

View File

@@ -36,10 +36,8 @@ export async function saveChat({
try {
const chat = await MongoChat.findOne(
{
chatId,
teamId,
tmbId,
appId
appId,
chatId
},
'_id metadata'
);