perf: generate queue
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
/* 模型的知识库 */
|
||||
import { Schema, model, models, Model as MongoModel } from 'mongoose';
|
||||
import { TrainingDataSchema as TrainingDateType } from '@/types/mongoSchema';
|
||||
import { TrainingTypeMap } from '@/constants/plugin';
|
||||
|
||||
// pgList and vectorList, Only one of them will work
|
||||
|
||||
const TrainingDataSchema = new Schema({
|
||||
userId: {
|
||||
type: Schema.Types.ObjectId,
|
||||
@@ -19,18 +19,27 @@ const TrainingDataSchema = new Schema({
|
||||
type: Date,
|
||||
default: () => new Date('2000/1/1')
|
||||
},
|
||||
vectorList: {
|
||||
type: [{ q: String, a: String }],
|
||||
default: []
|
||||
mode: {
|
||||
type: String,
|
||||
enum: Object.keys(TrainingTypeMap),
|
||||
required: true
|
||||
},
|
||||
prompt: {
|
||||
// 拆分时的提示词
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
qaList: {
|
||||
type: [String],
|
||||
default: []
|
||||
q: {
|
||||
// 如果是
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
a: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
vectorList: {
|
||||
type: Object
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user