mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 14:57:42 +00:00
* fix: preserve deployment skills on agents * fix: expose deployment skills to agent viewers * refactor: centralize deployment skill ID merging --------- Co-authored-by: Dennis Schenk <dennis@gridonic.ch>
23 lines
648 B
JavaScript
23 lines
648 B
JavaScript
const mongoose = require('mongoose');
|
|
const { createMethods } = require('@librechat/data-schemas');
|
|
const { matchModelName, findMatchingPattern, isDeploymentSkillId } = require('@librechat/api');
|
|
const getLogStores = require('~/cache/getLogStores');
|
|
|
|
const methods = createMethods(mongoose, {
|
|
matchModelName,
|
|
findMatchingPattern,
|
|
isExternalSkillId: isDeploymentSkillId,
|
|
getCache: getLogStores,
|
|
});
|
|
|
|
const seedDatabase = async () => {
|
|
await methods.initializeRoles();
|
|
await methods.seedDefaultRoles();
|
|
await methods.ensureDefaultCategories();
|
|
await methods.seedSystemGrants();
|
|
};
|
|
|
|
module.exports = {
|
|
...methods,
|
|
seedDatabase,
|
|
};
|