LibreChat/api/utils/loadYaml.js
Danny Avila d6d3d2ba13
🔧 fix: langchain packages mismatch, mount config file for deploy-compose.yaml, silence config not found error (#1481)
* fix(api): version mismatch between langchain packages `@langchain/google-genai` & `langchain`

* chore(loadYaml): silence config file not found error

* chore: improve firebase init message when not configured (generalized)

* fix(deploy-compose.yml): mount `librechat.yaml` config file
2024-01-03 10:59:38 -05:00

13 lines
267 B
JavaScript

const fs = require('fs');
const yaml = require('js-yaml');
function loadYaml(filepath) {
try {
let fileContents = fs.readFileSync(filepath, 'utf8');
return yaml.load(fileContents);
} catch (e) {
// console.error(e);
}
}
module.exports = loadYaml;