Skip to content

Commit

Permalink
make throw as tests expect, style
Browse files Browse the repository at this point in the history
  • Loading branch information
odilitime committed Dec 20, 2024
1 parent bc81322 commit 132d4ef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/core/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,13 @@ async function getModels() {
);
cacheModels = generateModels(hasCUDA);
}
return cacheModels
return cacheModels;
}

export async function getModelProviderData(provider: ModelProviderName) {
const models = await getModels()
const models = await getModels();
if (!models[provider]) {
throw new Error(`getModelProviderData failed Unkonwn provider ${provider}`);
}
return models[provider]
}

0 comments on commit 132d4ef

Please sign in to comment.