mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-06 16:20:19 +01:00
9 lines
312 B
TypeScript
9 lines
312 B
TypeScript
|
|
import promptSchema, { IPrompt } from '~/schema/prompt';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates or returns the Prompt model using the provided mongoose instance and schema
|
||
|
|
*/
|
||
|
|
export function createPromptModel(mongoose: typeof import('mongoose')) {
|
||
|
|
return mongoose.models.Prompt || mongoose.model<IPrompt>('Prompt', promptSchema);
|
||
|
|
}
|