Skip to content

Commit

Permalink
Merge pull request #578 from ryanhopperlowe/ui/fix/prevent-breakage-f…
Browse files Browse the repository at this point in the history
…or-ollama-provider

fix: admin - prevent breakage when selecting Ollama as a provider in model form
  • Loading branch information
ryanhopperlowe authored Nov 13, 2024
2 parents 6036856 + da8ad6f commit 3b6f500
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 3b6f500

Please sign in to comment.