@@ -3,16 +3,21 @@ import {
3
3
Baichuan ,
4
4
ChatGLM ,
5
5
Claude ,
6
+ Cohere ,
6
7
Gemini ,
7
8
Gemma ,
9
+ Hunyuan ,
8
10
LLaVA ,
9
11
Meta ,
10
12
Minimax ,
11
13
Mistral ,
12
14
Moonshot ,
13
15
OpenAI ,
16
+ OpenRouter ,
14
17
Perplexity ,
18
+ Spark ,
15
19
Tongyi ,
20
+ Wenxin ,
16
21
Yi ,
17
22
} from '@lobehub/icons' ;
18
23
import { memo } from 'react' ;
@@ -28,9 +33,9 @@ const ModelIcon = memo<ModelProviderIconProps>(({ model: originModel, size = 12
28
33
// lower case the origin model so to better match more model id case
29
34
const model = originModel . toLowerCase ( ) ;
30
35
31
- if ( model . startsWith ( 'gpt-3' ) ) return < OpenAI . Avatar size = { size } type = { 'gpt3' } /> ;
32
- if ( model . startsWith ( 'gpt-4' ) ) return < OpenAI . Avatar size = { size } type = { 'gpt4' } /> ;
33
- if ( model . startsWith ( 'glm' ) ) return < ChatGLM . Avatar size = { size } /> ;
36
+ if ( model . includes ( 'gpt-3' ) ) return < OpenAI . Avatar size = { size } type = { 'gpt3' } /> ;
37
+ if ( model . includes ( 'gpt-4' ) ) return < OpenAI . Avatar size = { size } type = { 'gpt4' } /> ;
38
+ if ( model . startsWith ( 'glm' ) || model . includes ( 'chatglm' ) ) return < ChatGLM . Avatar size = { size } /> ;
34
39
if ( model . includes ( 'claude' ) ) return < Claude . Avatar size = { size } /> ;
35
40
if ( model . includes ( 'titan' ) ) return < Aws . Avatar size = { size } /> ;
36
41
if ( model . includes ( 'llama' ) ) return < Meta . Avatar size = { size } /> ;
@@ -42,9 +47,19 @@ const ModelIcon = memo<ModelProviderIconProps>(({ model: originModel, size = 12
42
47
if ( model . includes ( 'moonshot' ) ) return < Moonshot . Avatar size = { size } /> ;
43
48
if ( model . includes ( 'baichuan' ) )
44
49
return < Baichuan . Avatar background = { Baichuan . colorPrimary } size = { size } /> ;
50
+
45
51
if ( model . includes ( 'mistral' ) || model . includes ( 'mixtral' ) ) return < Mistral . Avatar size = { size } /> ;
46
- if ( model . includes ( 'pplx' ) ) return < Perplexity . Avatar size = { size } /> ;
52
+
53
+ if ( model . includes ( 'pplx' ) || model . includes ( 'sonar' ) ) return < Perplexity . Avatar size = { size } /> ;
54
+
47
55
if ( model . includes ( 'yi-' ) ) return < Yi . Avatar size = { size } /> ;
56
+ if ( model . includes ( 'openrouter' ) ) return < OpenRouter . Avatar size = { size } /> ;
57
+ if ( model . includes ( 'command' ) ) return < Cohere . Color size = { size } /> ;
58
+
59
+ if ( model . includes ( 'ernie' ) ) return < Wenxin . Avatar size = { size } /> ;
60
+ if ( model . includes ( 'spark' ) ) return < Spark . Avatar size = { size } /> ;
61
+ if ( model . includes ( 'hunyuan' ) ) return < Hunyuan . Avatar size = { size } /> ;
62
+ if ( model . includes ( 'abab' ) ) return < Minimax . Avatar size = { size } /> ;
48
63
} ) ;
49
64
50
65
export default ModelIcon ;
0 commit comments