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 19, 2024
1 parent ee88732 commit 1a492ec
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] === id || item.identifier === id;
});

if (!model) return;

Expand Down

0 comments on commit 1a492ec

Please sign in to comment.