mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-28 17:29:44 +00:00
feat: vision model (#489)
* mongo init * perf: mongo connect * perf: tts perf: whisper and tts peref: tts whisper permission log reabase (#488) * perf: modal * i18n * perf: schema lean * feat: vision model format * perf: tts loading * perf: static data * perf: tts * feat: image * perf: image * perf: upload image and title * perf: image size * doc * perf: color * doc * speaking can not select file * doc
This commit is contained in:
@@ -29,16 +29,16 @@ export async function generateQA(): Promise<any> {
|
||||
error = false
|
||||
} = await (async () => {
|
||||
try {
|
||||
const data = (
|
||||
await MongoDatasetTraining.findOneAndUpdate(
|
||||
{
|
||||
mode: TrainingModeEnum.qa,
|
||||
lockTime: { $lte: new Date(Date.now() - 10 * 60 * 1000) }
|
||||
},
|
||||
{
|
||||
lockTime: new Date()
|
||||
}
|
||||
).select({
|
||||
const data = await MongoDatasetTraining.findOneAndUpdate(
|
||||
{
|
||||
mode: TrainingModeEnum.qa,
|
||||
lockTime: { $lte: new Date(Date.now() - 10 * 60 * 1000) }
|
||||
},
|
||||
{
|
||||
lockTime: new Date()
|
||||
}
|
||||
)
|
||||
.select({
|
||||
_id: 1,
|
||||
userId: 1,
|
||||
teamId: 1,
|
||||
@@ -50,7 +50,7 @@ export async function generateQA(): Promise<any> {
|
||||
billId: 1,
|
||||
prompt: 1
|
||||
})
|
||||
)?.toJSON();
|
||||
.lean();
|
||||
|
||||
// task preemption
|
||||
if (!data) {
|
||||
|
Reference in New Issue
Block a user