mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-10 04:28:50 +01:00
* chore: linting for `loadCustomConfig` * refactor: decouple CDN init and variable/health checks from AppService * refactor: move AppService to packages/data-schemas * chore: update AppConfig import path to use data-schemas * chore: update JsonSchemaType import path to use data-schemas * refactor: update UserController to import webSearchKeys and redefine FunctionTool typedef * chore: remove AppService.js * refactor: update AppConfig interface to use Partial<TCustomConfig> and make paths and fileStrategies optional * refactor: update checkConfig function to accept Partial<TCustomConfig> * chore: fix types * refactor: move handleRateLimits to startup checks as is an effect * test: remove outdated rate limit tests from AppService.spec and add new handleRateLimits tests in checks.spec
12 lines
422 B
TypeScript
12 lines
422 B
TypeScript
import promptGroupSchema from '~/schema/promptGroup';
|
|
import type { IPromptGroupDocument } from '~/types/prompts';
|
|
|
|
/**
|
|
* Creates or returns the PromptGroup model using the provided mongoose instance and schema
|
|
*/
|
|
export function createPromptGroupModel(mongoose: typeof import('mongoose')) {
|
|
return (
|
|
mongoose.models.PromptGroup ||
|
|
mongoose.model<IPromptGroupDocument>('PromptGroup', promptGroupSchema)
|
|
);
|
|
}
|