mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
🛠️ refactor: Model Loading and Custom Endpoint Error Handling (#1849)
* fix: handle non-assistant role ChatCompletionMessage error * refactor(ModelController): decouple res.send from loading/caching models * fix(custom/initializeClient): only fetch custom endpoint models if models.fetch is true * refactor(validateModel): load models if modelsConfig is not yet cached * docs: update on file upload rate limiting
This commit is contained in:
parent
542494fad6
commit
dd8038b375
7 changed files with 47 additions and 10 deletions
|
|
@ -1,8 +1,8 @@
|
|||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const controller = require('../controllers/ModelController');
|
||||
const { requireJwtAuth } = require('../middleware/');
|
||||
const { modelController } = require('~/server/controllers/ModelController');
|
||||
const { requireJwtAuth } = require('~/server/middleware/');
|
||||
|
||||
router.get('/', requireJwtAuth, controller);
|
||||
const router = express.Router();
|
||||
router.get('/', requireJwtAuth, modelController);
|
||||
|
||||
module.exports = router;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue