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:
@@ -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();
|
||||
|
@@ -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
|
||||
};
|
||||
}
|
||||
|
@@ -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()
|
||||
|
@@ -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()
|
||||
|
@@ -36,10 +36,8 @@ export async function saveChat({
|
||||
try {
|
||||
const chat = await MongoChat.findOne(
|
||||
{
|
||||
chatId,
|
||||
teamId,
|
||||
tmbId,
|
||||
appId
|
||||
appId,
|
||||
chatId
|
||||
},
|
||||
'_id metadata'
|
||||
);
|
||||
|
Reference in New Issue
Block a user