chat client clean up and switch to llama.cpp with models folder network sharing
This commit is contained in:
21
packages/orchestration-service/src/routes/models.js
Normal file
21
packages/orchestration-service/src/routes/models.js
Normal file
@@ -0,0 +1,21 @@
|
||||
// routes/models.js
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const {getEnv} = require('@nexusai/shared');
|
||||
|
||||
const MODELS_PATH = getEnv('MODELS_MANIFEST_PATH', path.join(__dirname, '../models.json'));
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
try {
|
||||
const raw = fs.readFileSync(MODELS_PATH, 'utf8');
|
||||
const models = JSON.parse(raw);
|
||||
res.json(models);
|
||||
} catch (err) {
|
||||
console.error('[models] Failed to read manifest:', err.message);
|
||||
res.status(500).json({ error: 'Could not load models manifest' });
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user