Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💄 style: fix stepfun & baichuan model tag icon missing #3379

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading