Download api/models/schema/roleSchema.js from Zhitomir/chat: direct link, hf CLI and curl.
- Browser
- Download file 595 Bytes
-
https://huggingface.co/spaces/Zhitomir/chat/resolve/main/api/models/schema/roleSchema.js
- Command line
-
hf download hf://spaces/Zhitomir/chat/api/models/schema/roleSchema.js
-
curl -L -o roleSchema.js https://huggingface.co/spaces/Zhitomir/chat/resolve/main/api/models/schema/roleSchema.js
595 Bytes
| const { PermissionTypes, Permissions } = require('librechat-data-provider'); | |
| const mongoose = require('mongoose'); | |
| const roleSchema = new mongoose.Schema({ | |
| name: { | |
| type: String, | |
| required: true, | |
| unique: true, | |
| index: true, | |
| }, | |
| [PermissionTypes.PROMPTS]: { | |
| [Permissions.SHARED_GLOBAL]: { | |
| type: Boolean, | |
| default: false, | |
| }, | |
| [Permissions.USE]: { | |
| type: Boolean, | |
| default: true, | |
| }, | |
| [Permissions.CREATE]: { | |
| type: Boolean, | |
| default: true, | |
| }, | |
| }, | |
| }); | |
| const Role = mongoose.model('Role', roleSchema); | |
| module.exports = Role; | |