mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-03-27 18:16:33 +01:00
🔄 chore: Consolidate agent model imports across middleware and tests from rebase
- Updated imports for `createAgent` and `getAgent` to streamline access from a unified `~/models` path. - Enhanced test files to reflect the new import structure, ensuring consistency and maintainability across the codebase. - Improved clarity by removing redundant imports and aligning with the latest model updates.
This commit is contained in:
parent
a0fed6173c
commit
dd72b7b17e
5 changed files with 7 additions and 7 deletions
|
|
@ -10,7 +10,7 @@ const {
|
|||
ResourceType,
|
||||
PrincipalType,
|
||||
} = require('librechat-data-provider');
|
||||
const { createAgent } = require('~/models/Agent');
|
||||
const { createAgent } = require('~/models');
|
||||
|
||||
jest.mock('~/server/services/Files/process', () => ({
|
||||
processAgentFileUpload: jest.fn().mockImplementation(async ({ res }) => {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const {
|
|||
filterFile,
|
||||
} = require('~/server/services/Files/process');
|
||||
const { checkPermission } = require('~/server/services/PermissionService');
|
||||
const { getAgent } = require('~/models/Agent');
|
||||
const db = require('~/models');
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ router.post('/', async (req, res) => {
|
|||
req,
|
||||
res,
|
||||
metadata,
|
||||
getAgent,
|
||||
getAgent: db.getAgent,
|
||||
checkPermission,
|
||||
});
|
||||
if (denied) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue