Skip to content

Commit

Permalink
fix: correct the model list on the model provider's page
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Dec 16, 2024
1 parent 321b7a1 commit 5859ddd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server/services/discover/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,10 @@ export class DiscoverService {

getModelById = async (locale: Locales, id: string): Promise<DiscoverModelItem | undefined> => {
const list = await this.getModelList(locale);
let model = list.find((item) => item.identifier === id);
let model = list.find((item) => {
const ids = item.identifier.split('/');
return ids[1] || item.identifier === id;
});

if (!model) return;

Expand Down

0 comments on commit 5859ddd

Please sign in to comment.