mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
👤 feat: User ID in Model Query; chore: cleanup ModelService (#1753)
* feat: send the LibreChat user ID as a query param when fetching the list of models * chore: update bun * chore: change bun command for building data-provider * refactor: prefer use of `getCustomConfig` to access custom config, also move to `server/services/Config` * refactor: make endpoints/custom option for the config optional, add userIdQuery, and use modelQueries log store in ModelService * refactor(ModelService): use env variables at runtime, use default models from data-provider, and add tests * docs: add `userIdQuery` * fix(ci): import changed
This commit is contained in:
parent
d06e5d2e02
commit
ff057152e2
17 changed files with 339 additions and 83 deletions
|
@ -17,6 +17,7 @@ const configPath = path.resolve(projectRoot, 'librechat.yaml');
|
|||
async function loadCustomConfig() {
|
||||
const customConfig = loadYaml(configPath);
|
||||
if (!customConfig) {
|
||||
logger.info('Custom config file missing or YAML format invalid.');
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -25,7 +26,7 @@ async function loadCustomConfig() {
|
|||
logger.error(`Invalid custom config file at ${configPath}`, result.error);
|
||||
return null;
|
||||
} else {
|
||||
logger.info('Loaded custom config file:');
|
||||
logger.info('Custom config file loaded:');
|
||||
logger.info(JSON.stringify(customConfig, null, 2));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue