From e283ef4f2e487fee203ba7e61ccc2ccd134709a8 Mon Sep 17 00:00:00 2001 From: Zhijie He Date: Fri, 2 Aug 2024 01:32:42 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20fix=20stepfun=20&=20bai?= =?UTF-8?q?chuan=20model=20tag=20icon=20missing=20(#3379)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ModelTag/ModelIcon.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/ModelTag/ModelIcon.tsx b/src/components/ModelTag/ModelIcon.tsx index c5d01fcd432a..dfeeef79dc42 100644 --- a/src/components/ModelTag/ModelIcon.tsx +++ b/src/components/ModelTag/ModelIcon.tsx @@ -29,6 +29,7 @@ import { Rwkv, Spark, Stability, + Stepfun, Tongyi, Wenxin, Yi, @@ -40,9 +41,12 @@ interface ModelIconProps { size?: number; } -const ModelIcon = memo(({ model, size = 12 }) => { - if (!model) return; +const ModelIcon = memo(({ model: originModel, size = 12 }) => { + if (!originModel) return; + // lower case the origin model so to better match more model id case + const model = originModel.toLowerCase(); + // currently supported models, maybe not in its own provider if (model.startsWith('gpt')) return ; if (model.startsWith('glm') || model.includes('chatglm')) return ; @@ -65,6 +69,7 @@ const ModelIcon = memo(({ model, size = 12 }) => { if (model.startsWith('openchat')) return ; if (model.includes('command')) return ; if (model.includes('dbrx')) return ; + if (model.includes('step')) return ; if (model.includes('taichu')) return ; if (model.includes('360gpt')) return ;