Download packages/data-schemas/src/models/session.ts from helloya20/chat: direct link, hf CLI and curl.
- Browser
- Download file 344 Bytes
-
https://huggingface.co/spaces/helloya20/chat/resolve/main/packages/data-schemas/src/models/session.ts
- Command line
-
hf download hf://spaces/helloya20/chat/packages/data-schemas/src/models/session.ts
-
curl -L -o session.ts https://huggingface.co/spaces/helloya20/chat/resolve/main/packages/data-schemas/src/models/session.ts
344 Bytes
| import sessionSchema from '~/schema/session'; | |
| import type * as t from '~/types'; | |
| /** | |
| * Creates or returns the Session model using the provided mongoose instance and schema | |
| */ | |
| export function createSessionModel(mongoose: typeof import('mongoose')) { | |
| return mongoose.models.Session || mongoose.model<t.ISession>('Session', sessionSchema); | |
| } | |