Skip to content

Commit

Permalink
feat: new provider (#3513)
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu authored Jan 2, 2025
1 parent bd4893c commit f39ea04
Show file tree
Hide file tree
Showing 12 changed files with 150 additions and 13 deletions.
5 changes: 5 additions & 0 deletions docSite/content/zh-cn/docs/development/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ weight: 707
- OpenAI
- Claude
- Gemini
- Meta
- MistralAI
- AliCloud - 阿里云
- Qwen - 通义千问
- Doubao - 豆包
- ChatGLM - 智谱
Expand All @@ -215,7 +217,10 @@ weight: 707
- Baichuan - 百川
- Yi - 零一万物
- Ernie - 文心一言
- StepFun - 阶跃星辰
- Ollama
- BAAI - 智源研究院
- FishAudio
- Other - 其他


Expand Down
43 changes: 37 additions & 6 deletions packages/global/core/ai/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,25 @@ export type ModelProviderIdType =
| 'OpenAI'
| 'Claude'
| 'Gemini'
| 'Meta'
| 'MistralAI'
| 'Groq'
| 'AliCloud'
| 'Qwen'
| 'Doubao'
| 'ChatGLM'
| 'DeepSeek'
| 'Ernie'
| 'Moonshot'
| 'MiniMax'
| 'SparkDesk'
| 'Hunyuan'
| 'Baichuan'
| 'StepFun'
| 'Yi'
| 'Ernie'
| 'Ollama'
| 'BAAI'
| 'FishAudio'
| 'Other';

export type ModelProviderType = {
Expand All @@ -42,6 +47,11 @@ export const ModelProviderList: ModelProviderType[] = [
name: 'Gemini',
avatar: 'model/gemini'
},
{
id: 'Meta',
name: 'Meta',
avatar: 'model/meta'
},
{
id: 'MistralAI',
name: 'MistralAI',
Expand All @@ -52,6 +62,11 @@ export const ModelProviderList: ModelProviderType[] = [
name: 'Groq',
avatar: 'model/groq'
},
{
id: 'AliCloud',
name: i18nT('common:model_alicloud'),
avatar: 'model/alicloud'
},
{
id: 'Qwen',
name: i18nT('common:model_qwen'),
Expand All @@ -67,6 +82,11 @@ export const ModelProviderList: ModelProviderType[] = [
name: i18nT('common:model_chatglm'),
avatar: 'model/chatglm'
},
{
id: 'Ernie',
name: i18nT('common:model_ernie'),
avatar: 'model/ernie'
},
{
id: 'DeepSeek',
name: 'DeepSeek',
Expand Down Expand Up @@ -97,21 +117,32 @@ export const ModelProviderList: ModelProviderType[] = [
name: i18nT('common:model_baichuan'),
avatar: 'model/baichuan'
},
{
id: 'StepFun',
name: i18nT('common:model_stepfun'),
avatar: 'model/stepfun'
},
{
id: 'Yi',
name: i18nT('common:model_yi'),
avatar: 'model/yi'
},
{
id: 'Ernie',
name: i18nT('common:model_ernie'),
avatar: 'model/ernie'
},

{
id: 'Ollama',
name: 'Ollama',
avatar: 'model/ollama'
},
{
id: 'BAAI',
name: i18nT('common:model_baai'),
avatar: 'model/BAAI'
},
{
id: 'FishAudio',
name: 'FishAudio',
avatar: 'model/fishaudio'
},
{
id: 'Other',
name: i18nT('common:model_other'),
Expand Down
5 changes: 5 additions & 0 deletions packages/web/components/common/Icon/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,23 +357,28 @@ export const iconPaths = {
'modal/selectSource': () => import('./icons/modal/selectSource.svg'),
'modal/setting': () => import('./icons/modal/setting.svg'),
'modal/teamPlans': () => import('./icons/modal/teamPlans.svg'),
'model/BAAI': () => import('./icons/model/BAAI.svg'),
'model/alicloud': () => import('./icons/model/alicloud.svg'),
'model/baichuan': () => import('./icons/model/baichuan.svg'),
'model/chatglm': () => import('./icons/model/chatglm.svg'),
'model/claude': () => import('./icons/model/claude.svg'),
'model/deepseek': () => import('./icons/model/deepseek.svg'),
'model/doubao': () => import('./icons/model/doubao.svg'),
'model/ernie': () => import('./icons/model/ernie.svg'),
'model/fishaudio': () => import('./icons/model/fishaudio.svg'),
'model/gemini': () => import('./icons/model/gemini.svg'),
'model/groq': () => import('./icons/model/groq.svg'),
'model/huggingface': () => import('./icons/model/huggingface.svg'),
'model/hunyuan': () => import('./icons/model/hunyuan.svg'),
'model/meta': () => import('./icons/model/meta.svg'),
'model/minimax': () => import('./icons/model/minimax.svg'),
'model/mistral': () => import('./icons/model/mistral.svg'),
'model/moonshot': () => import('./icons/model/moonshot.svg'),
'model/ollama': () => import('./icons/model/ollama.svg'),
'model/openai': () => import('./icons/model/openai.svg'),
'model/qwen': () => import('./icons/model/qwen.svg'),
'model/sparkDesk': () => import('./icons/model/sparkDesk.svg'),
'model/stepfun': () => import('./icons/model/stepfun.svg'),
'model/yi': () => import('./icons/model/yi.svg'),
more: () => import('./icons/more.svg'),
moreLine: () => import('./icons/moreLine.svg'),
Expand Down
3 changes: 3 additions & 0 deletions packages/web/components/common/Icon/icons/model/BAAI.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions packages/web/components/common/Icon/icons/model/fishaudio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions packages/web/components/common/Icon/icons/model/meta.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f39ea04

Please sign in to comment.