mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
Change embedding (#1463)
* rebuild embedding queue * dataset menu * feat: rebuild data api * feat: ui change embedding model * dataset ui * feat: rebuild index ui * rename collection
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
import { DatasetCollectionName } from '../schema';
|
||||
import { DatasetColCollectionName } from '../collection/schema';
|
||||
|
||||
export const DatasetDataCollectionName = 'dataset.datas';
|
||||
export const DatasetDataCollectionName = 'dataset_datas';
|
||||
|
||||
const DatasetDataSchema = new Schema({
|
||||
teamId: {
|
||||
@@ -73,7 +73,8 @@ const DatasetDataSchema = new Schema({
|
||||
},
|
||||
inited: {
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
rebuilding: Boolean
|
||||
});
|
||||
|
||||
try {
|
||||
@@ -90,10 +91,13 @@ try {
|
||||
{ background: true }
|
||||
);
|
||||
DatasetDataSchema.index({ updateTime: 1 }, { background: true });
|
||||
// rebuild data
|
||||
DatasetDataSchema.index({ rebuilding: 1, teamId: 1, datasetId: 1 }, { background: true });
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
export const MongoDatasetData: Model<DatasetDataSchemaType> =
|
||||
models[DatasetDataCollectionName] || model(DatasetDataCollectionName, DatasetDataSchema);
|
||||
|
||||
MongoDatasetData.syncIndexes();
|
||||
|
Reference in New Issue
Block a user