From a3ee0102864597bc512bbd4604806b6daf3e75ee Mon Sep 17 00:00:00 2001 From: jialin Date: Tue, 1 Apr 2025 13:53:57 +0800 Subject: [PATCH] fix: visit auto playground error from model list --- src/pages/llmodels/components/table-list.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/pages/llmodels/components/table-list.tsx b/src/pages/llmodels/components/table-list.tsx index 8d77a2a6..7ce6e0b1 100644 --- a/src/pages/llmodels/components/table-list.tsx +++ b/src/pages/llmodels/components/table-list.tsx @@ -61,6 +61,7 @@ import { backendOptionsMap, getSourceRepoConfigValue, modelCategories, + modelCategoriesMap, modelSourceMap } from '../config'; import { @@ -357,7 +358,16 @@ const Models: React.FC = ({ const handleOpenPlayGround = (row: any) => { for (const [category, path] of Object.entries(categoryToPathMap)) { - console.log('category:', category, path); + if ( + row.categories?.includes(category) && + [ + modelCategoriesMap.text_to_speech, + modelCategoriesMap.speech_to_text + ].includes(category) + ) { + navigate(`${path}&model=${row.name}`); + return; + } if (row.categories?.includes(category)) { navigate(`${path}?model=${row.name}`); return;