mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 08:12:00 +02:00
🦙 fix: normalized endpoint for Ollama (#4681)
This commit is contained in:
parent
81f29360e8
commit
3c94ff2c04
1 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
const { CacheKeys, EModelEndpoint } = require('librechat-data-provider');
|
const { CacheKeys, EModelEndpoint } = require('librechat-data-provider');
|
||||||
|
const { normalizeEndpointName } = require('~/server/utils');
|
||||||
const loadCustomConfig = require('./loadCustomConfig');
|
const loadCustomConfig = require('./loadCustomConfig');
|
||||||
const getLogStores = require('~/cache/getLogStores');
|
const getLogStores = require('~/cache/getLogStores');
|
||||||
|
|
||||||
|
@ -34,7 +35,9 @@ const getCustomEndpointConfig = async (endpoint) => {
|
||||||
|
|
||||||
const { endpoints = {} } = customConfig;
|
const { endpoints = {} } = customConfig;
|
||||||
const customEndpoints = endpoints[EModelEndpoint.custom] ?? [];
|
const customEndpoints = endpoints[EModelEndpoint.custom] ?? [];
|
||||||
return customEndpoints.find((endpointConfig) => endpointConfig.name === endpoint);
|
return customEndpoints.find(
|
||||||
|
(endpointConfig) => normalizeEndpointName(endpointConfig.name) === endpoint,
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = { getCustomConfig, getCustomEndpointConfig };
|
module.exports = { getCustomConfig, getCustomEndpointConfig };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue