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,16 +1,7 @@
|
|||
const { Providers } = require('@librechat/agents');
|
||||
const { EModelEndpoint, extractEnvVariable } = require('librechat-data-provider');
|
||||
const { isUserProvided, normalizeEndpointName } = require('~/server/utils');
|
||||
const { fetchModels } = require('~/server/services/ModelService');
|
||||
const { getCustomConfig } = require('./getCustomConfig');
|
||||
const { isUserProvided } = require('~/server/utils');
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @returns {string}
|
||||
*/
|
||||
function normalizeEndpointName(name = '') {
|
||||
return name.toLowerCase() === Providers.OLLAMA ? Providers.OLLAMA : name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load config endpoints from the cached configuration object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue