Skip to content

Commit

Permalink
fix match model default length
Browse files Browse the repository at this point in the history
  • Loading branch information
zerob13 committed Feb 26, 2025
1 parent bd96bb8 commit b505341
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/presenter/llmProviderPresenter/modelConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ export interface ProviderModelConfigs {
* @returns ModelConfig | undefined 如果找到配置则返回,否则返回undefined
*/
export function getModelConfig(modelId: string): ModelConfig | undefined {
const providerConfigs = defaultModelsSettings.find(
(config) =>
(config.id.toLowerCase() === modelId.toLowerCase() ||
config.name.toLowerCase() === modelId.toLowerCase()) &&
config.match.every((matchString) => modelId.toLowerCase().includes(matchString))
const providerConfigs = defaultModelsSettings.find((config) =>
config.match.every((matchString) => modelId.toLowerCase().includes(matchString.toLowerCase()))
)

if (!providerConfigs) {
Expand Down

0 comments on commit b505341

Please sign in to comment.