mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-07 08:40:19 +01:00
10 lines
366 B
TypeScript
10 lines
366 B
TypeScript
|
|
import assistantSchema from '~/schema/assistant';
|
||
|
|
import type { IAssistant } from '~/types';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates or returns the Assistant model using the provided mongoose instance and schema
|
||
|
|
*/
|
||
|
|
export function createAssistantModel(mongoose: typeof import('mongoose')) {
|
||
|
|
return mongoose.models.Assistant || mongoose.model<IAssistant>('Assistant', assistantSchema);
|
||
|
|
}
|