mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
🦙 refactor: Normalize Ollama Config Names (#4657)
This commit is contained in:
parent
c27b26cc31
commit
d60a0af878
3 changed files with 17 additions and 14 deletions
|
|
@ -1,6 +1,6 @@
|
|||
const { EModelEndpoint, extractEnvVariable } = require('librechat-data-provider');
|
||||
const { isUserProvided, normalizeEndpointName } = require('~/server/utils');
|
||||
const { getCustomConfig } = require('./getCustomConfig');
|
||||
const { isUserProvided } = require('~/server/utils');
|
||||
|
||||
/**
|
||||
* Load config endpoints from the cached configuration object
|
||||
|
|
@ -29,7 +29,8 @@ async function loadConfigEndpoints(req) {
|
|||
|
||||
for (let i = 0; i < customEndpoints.length; i++) {
|
||||
const endpoint = customEndpoints[i];
|
||||
const { baseURL, apiKey, name, iconURL, modelDisplayLabel } = endpoint;
|
||||
const { baseURL, apiKey, name: configName, iconURL, modelDisplayLabel } = endpoint;
|
||||
const name = normalizeEndpointName(configName);
|
||||
|
||||
const resolvedApiKey = extractEnvVariable(apiKey);
|
||||
const resolvedBaseURL = extractEnvVariable(baseURL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue