Skip to content

Commit

Permalink
fix: admin - prevent breakage when selecting Ollama as a provider in …
Browse files Browse the repository at this point in the history
…model form
  • Loading branch information
ryanhopperlowe committed Nov 13, 2024
1 parent 6036856 commit da8ad6f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ui/admin/app/lib/model/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ const ModelToProviderMap = {
};

export function getModelsForProvider(providerId: string) {
if (!providerId) return [];

if (!(providerId in ModelToProviderMap))
throw new Error(`Unknown provider: ${providerId}`);

if (!providerId || !(providerId in ModelToProviderMap)) return [];
return ModelToProviderMap[providerId as keyof typeof ModelToProviderMap];
}

0 comments on commit da8ad6f

Please sign in to comment.