mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 22:03:54 +00:00

* doc * feat: file upload config * perf: chat box file params * feat: markdown show file * feat: chat file store and clear * perf: read file contentType * feat: llm vision config * feat: file url output * perf: plugin error text * perf: image load * feat: ai chat document * perf: file block ui * feat: read file node * feat: file read response field * feat: simple mode support read files * feat: tool call * feat: read file histories * perf: select file * perf: select file config * i18n * i18n * fix: ts; feat: tool response preview result
18 lines
553 B
TypeScript
18 lines
553 B
TypeScript
import { connectionMongo, getMongoModel, type Model } from '../../mongo';
|
|
const { Schema } = connectionMongo;
|
|
|
|
const DatasetFileSchema = new Schema({});
|
|
const ChatFileSchema = new Schema({});
|
|
|
|
try {
|
|
DatasetFileSchema.index({ uploadDate: -1 });
|
|
|
|
ChatFileSchema.index({ uploadDate: -1 });
|
|
ChatFileSchema.index({ 'metadata.chatId': 1 });
|
|
} catch (error) {
|
|
console.log(error);
|
|
}
|
|
|
|
export const MongoDatasetFileSchema = getMongoModel('dataset.files', DatasetFileSchema);
|
|
export const MongoChatFileSchema = getMongoModel('chat.files', ChatFileSchema);
|