Skip to content

Commit

Permalink
🦙 fix: normalized endpoint for Ollama (#4681)
Browse files Browse the repository at this point in the history
  • Loading branch information
danny-avila authored Nov 10, 2024
1 parent 81f2936 commit 3c94ff2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/server/services/Config/getCustomConfig.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { CacheKeys, EModelEndpoint } = require('librechat-data-provider');
const { normalizeEndpointName } = require('~/server/utils');
const loadCustomConfig = require('./loadCustomConfig');
const getLogStores = require('~/cache/getLogStores');

Expand Down Expand Up @@ -34,7 +35,9 @@ const getCustomEndpointConfig = async (endpoint) => {

const { endpoints = {} } = customConfig;
const customEndpoints = endpoints[EModelEndpoint.custom] ?? [];
return customEndpoints.find((endpointConfig) => endpointConfig.name === endpoint);
return customEndpoints.find(
(endpointConfig) => normalizeEndpointName(endpointConfig.name) === endpoint,
);
};

module.exports = { getCustomConfig, getCustomEndpointConfig };

0 comments on commit 3c94ff2

Please sign in to comment.