mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-29 09:44:47 +00:00
perf: password special chars;feat: llm paragraph;perf: chunk setting params;perf: text splitter worker (#4984)
* perf: password special chars * feat: llm paragraph;perf: chunk setting params * perf: text splitter worker * perf: get rawtext buffer * fix: test * fix: test * doc * min chunk size
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { isTestEnv } from '@fastgpt/global/common/system/constants';
|
||||
import { addLog } from '../../common/system/log';
|
||||
import type { Model } from 'mongoose';
|
||||
import mongoose, { Mongoose } from 'mongoose';
|
||||
@@ -70,7 +71,7 @@ const addCommonMiddleware = (schema: mongoose.Schema) => {
|
||||
|
||||
export const getMongoModel = <T>(name: string, schema: mongoose.Schema) => {
|
||||
if (connectionMongo.models[name]) return connectionMongo.models[name] as Model<T>;
|
||||
if (process.env.NODE_ENV !== 'test') console.log('Load model======', name);
|
||||
if (!isTestEnv) console.log('Load model======', name);
|
||||
addCommonMiddleware(schema);
|
||||
|
||||
const model = connectionMongo.model<T>(name, schema);
|
||||
|
Reference in New Issue
Block a user