Skip to content

Commit

Permalink
💄 style: fix stepfun & baichuan model tag icon missing (lobehub#3379)
Browse files Browse the repository at this point in the history
  • Loading branch information
hezhijie0327 committed Aug 1, 2024
1 parent 06cb946 commit e283ef4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/ModelTag/ModelIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {
Rwkv,
Spark,
Stability,
Stepfun,
Tongyi,
Wenxin,
Yi,
Expand All @@ -40,9 +41,12 @@ interface ModelIconProps {
size?: number;
}

const ModelIcon = memo<ModelIconProps>(({ model, size = 12 }) => {
if (!model) return;
const ModelIcon = memo<ModelIconProps>(({ 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 <OpenAI size={size} />;
if (model.startsWith('glm') || model.includes('chatglm')) return <ChatGLM size={size} />;
Expand All @@ -65,6 +69,7 @@ const ModelIcon = memo<ModelIconProps>(({ model, size = 12 }) => {
if (model.startsWith('openchat')) return <OpenChat size={size} />;
if (model.includes('command')) return <Cohere size={size} />;
if (model.includes('dbrx')) return <Dbrx size={size} />;
if (model.includes('step')) return <Stepfun size={size} />;
if (model.includes('taichu')) return <AiMass size={size} />;
if (model.includes('360gpt')) return <Ai360 size={size} />;

Expand Down

0 comments on commit e283ef4

Please sign in to comment.