mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-17 16:05:32 +01:00
9 lines
338 B
TypeScript
9 lines
338 B
TypeScript
|
|
import toolCallSchema, { IToolCallData } from '~/schema/toolCall';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates or returns the ToolCall model using the provided mongoose instance and schema
|
||
|
|
*/
|
||
|
|
export function createToolCallModel(mongoose: typeof import('mongoose')) {
|
||
|
|
return mongoose.models.ToolCall || mongoose.model<IToolCallData>('ToolCall', toolCallSchema);
|
||
|
|
}
|