mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-24 04:10:15 +01:00
12 lines
406 B
TypeScript
12 lines
406 B
TypeScript
import agentCategorySchema from '~/schema/agentCategory';
|
|
import type * as t from '~/types';
|
|
|
|
/**
|
|
* Creates or returns the AgentCategory model using the provided mongoose instance and schema
|
|
*/
|
|
export function createAgentCategoryModel(mongoose: typeof import('mongoose')) {
|
|
return (
|
|
mongoose.models.AgentCategory ||
|
|
mongoose.model<t.IAgentCategory>('AgentCategory', agentCategorySchema)
|
|
);
|
|
}
|