@lobehub/chat 1.16.8 → 1.16.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @lobehub/chat might be problematic. Click here for more details.

Files changed (51) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/package.json +3 -3
  3. package/src/config/__tests__/auth.test.ts +200 -0
  4. package/src/config/auth.ts +97 -2
  5. package/src/config/modelProviders/ai360.ts +11 -0
  6. package/src/config/modelProviders/anthropic.ts +27 -18
  7. package/src/config/modelProviders/azure.ts +12 -3
  8. package/src/config/modelProviders/baichuan.ts +3 -1
  9. package/src/config/modelProviders/bedrock.ts +20 -18
  10. package/src/config/modelProviders/deepseek.ts +3 -1
  11. package/src/config/modelProviders/fireworksai.ts +33 -5
  12. package/src/config/modelProviders/google.ts +16 -13
  13. package/src/config/modelProviders/groq.ts +19 -8
  14. package/src/config/modelProviders/minimax.ts +8 -6
  15. package/src/config/modelProviders/mistral.ts +19 -3
  16. package/src/config/modelProviders/moonshot.ts +11 -1
  17. package/src/config/modelProviders/novita.ts +24 -0
  18. package/src/config/modelProviders/ollama.ts +58 -1
  19. package/src/config/modelProviders/openai.ts +52 -18
  20. package/src/config/modelProviders/openrouter.ts +21 -1
  21. package/src/config/modelProviders/perplexity.ts +19 -3
  22. package/src/config/modelProviders/qwen.ts +11 -8
  23. package/src/config/modelProviders/siliconcloud.ts +34 -1
  24. package/src/config/modelProviders/spark.ts +16 -7
  25. package/src/config/modelProviders/stepfun.ts +13 -1
  26. package/src/config/modelProviders/taichu.ts +7 -2
  27. package/src/config/modelProviders/togetherai.ts +38 -2
  28. package/src/config/modelProviders/upstage.ts +11 -4
  29. package/src/config/modelProviders/zeroone.ts +5 -1
  30. package/src/config/modelProviders/zhipu.ts +20 -18
  31. package/src/libs/agent-runtime/openai/__snapshots__/index.test.ts.snap +13 -6
  32. package/src/libs/agent-runtime/qwen/index.test.ts +20 -4
  33. package/src/libs/agent-runtime/qwen/index.ts +1 -1
  34. package/src/libs/next-auth/auth.config.ts +3 -1
  35. package/src/libs/next-auth/sso-providers/auth0.ts +5 -3
  36. package/src/libs/next-auth/sso-providers/authelia.ts +6 -6
  37. package/src/libs/next-auth/sso-providers/authentik.ts +5 -3
  38. package/src/libs/next-auth/sso-providers/azure-ad.ts +5 -3
  39. package/src/libs/next-auth/sso-providers/cloudflare-zero-trust.ts +4 -3
  40. package/src/libs/next-auth/sso-providers/generic-oidc.ts +3 -3
  41. package/src/libs/next-auth/sso-providers/github.ts +4 -2
  42. package/src/libs/next-auth/sso-providers/logto.ts +3 -3
  43. package/src/libs/next-auth/sso-providers/zitadel.ts +5 -3
  44. package/src/migrations/FromV3ToV4/fixtures/ollama-output-v4.json +1 -0
  45. package/src/server/routers/edge/config/__snapshots__/index.test.ts.snap +24 -4
  46. package/src/server/routers/edge/config/index.test.ts +3 -11
  47. package/src/store/user/slices/modelList/__snapshots__/action.test.ts.snap +12 -0
  48. package/src/store/user/slices/modelList/action.test.ts +3 -7
  49. package/src/types/llm.ts +1 -0
  50. package/src/utils/__snapshots__/parseModels.test.ts.snap +32 -0
  51. package/src/utils/parseModels.test.ts +1 -28
@@ -1,11 +1,11 @@
1
1
  import { ModelProviderCard } from '@/types/llm';
2
2
 
3
- // ref:
4
- // https://platform.openai.com/docs/deprecations
3
+ // ref: https://platform.openai.com/docs/deprecations
5
4
  const OpenAI: ModelProviderCard = {
6
5
  chatModels: [
7
6
  {
8
- description: 'Currently points to gpt-4o-mini-2024-07-18',
7
+ description:
8
+ 'GPT-4o mini是OpenAI在GPT-4 Omni之后推出的最新模型,支持图文输入并输出文本。作为他们最先进的小型模型,它比其他近期的前沿模型便宜很多,并且比GPT-3.5 Turbo便宜超过60%。它保持了最先进的智能,同时具有显著的性价比。GPT-4o mini在MMLU测试中获得了 82% 的得分,目前在聊天偏好上排名高于 GPT-4。',
9
9
  displayName: 'GPT-4o mini',
10
10
  enabled: true,
11
11
  functionCall: true,
@@ -19,7 +19,8 @@ const OpenAI: ModelProviderCard = {
19
19
  vision: true,
20
20
  },
21
21
  {
22
- description: 'Currently points to gpt-4o-2024-05-13',
22
+ description:
23
+ 'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
23
24
  displayName: 'GPT-4o',
24
25
  enabled: true,
25
26
  functionCall: true,
@@ -32,7 +33,8 @@ const OpenAI: ModelProviderCard = {
32
33
  vision: true,
33
34
  },
34
35
  {
35
- description: 'Latest GPT-4o snapshot that supports Structured Outputs',
36
+ description:
37
+ 'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
36
38
  displayName: 'GPT-4o (240806)',
37
39
  enabled: true,
38
40
  functionCall: true,
@@ -45,7 +47,8 @@ const OpenAI: ModelProviderCard = {
45
47
  vision: true,
46
48
  },
47
49
  {
48
- description: 'Latest GPT-4o snapshot that supports Structured Outputs',
50
+ description:
51
+ 'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
49
52
  displayName: 'GPT-4o (240513)',
50
53
  functionCall: true,
51
54
  id: 'gpt-4o-2024-05-13',
@@ -57,7 +60,8 @@ const OpenAI: ModelProviderCard = {
57
60
  vision: true,
58
61
  },
59
62
  {
60
- description: 'Dynamic model continuously updated to the current version of GPT-4o in ChatGPT',
63
+ description:
64
+ 'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
61
65
  displayName: 'ChatGPT-4o',
62
66
  enabled: true,
63
67
  id: 'chatgpt-4o-latest',
@@ -69,7 +73,8 @@ const OpenAI: ModelProviderCard = {
69
73
  vision: true,
70
74
  },
71
75
  {
72
- description: 'GPT-4 Turbo with Vision',
76
+ description:
77
+ '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
73
78
  displayName: 'GPT-4 Turbo',
74
79
  functionCall: true,
75
80
  id: 'gpt-4-turbo',
@@ -81,7 +86,8 @@ const OpenAI: ModelProviderCard = {
81
86
  vision: true,
82
87
  },
83
88
  {
84
- description: 'GPT-4 Turbo 视觉版 (240409)',
89
+ description:
90
+ '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
85
91
  displayName: 'GPT-4 Turbo Vision (240409)',
86
92
  functionCall: true,
87
93
  id: 'gpt-4-turbo-2024-04-09',
@@ -93,7 +99,8 @@ const OpenAI: ModelProviderCard = {
93
99
  vision: true,
94
100
  },
95
101
  {
96
- description: 'Currently points to gpt-4-0125-preview',
102
+ description:
103
+ '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
97
104
  displayName: 'GPT-4 Turbo Preview',
98
105
  functionCall: true,
99
106
  id: 'gpt-4-turbo-preview',
@@ -104,6 +111,8 @@ const OpenAI: ModelProviderCard = {
104
111
  tokens: 128_000,
105
112
  },
106
113
  {
114
+ description:
115
+ '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
107
116
  displayName: 'GPT-4 Turbo Preview (0125)',
108
117
  functionCall: true,
109
118
  id: 'gpt-4-0125-preview',
@@ -114,7 +123,8 @@ const OpenAI: ModelProviderCard = {
114
123
  tokens: 128_000,
115
124
  },
116
125
  {
117
- description: 'Currently points to gpt-4-1106-vision-preview', // Will be discontinued on December 6, 2024
126
+ description:
127
+ '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。', // Will be discontinued on December 6, 2024
118
128
  displayName: 'GPT-4 Turbo Vision Preview',
119
129
  id: 'gpt-4-vision-preview',
120
130
  pricing: {
@@ -125,7 +135,8 @@ const OpenAI: ModelProviderCard = {
125
135
  vision: true,
126
136
  },
127
137
  {
128
- displayName: 'GPT-4 Turbo Vision Preview (1106)', // Will be discontinued on December 6, 2024
138
+ description:
139
+ '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。', // Will be discontinued on December 6, 2024
129
140
  id: 'gpt-4-1106-vision-preview',
130
141
  pricing: {
131
142
  input: 10,
@@ -135,6 +146,8 @@ const OpenAI: ModelProviderCard = {
135
146
  vision: true,
136
147
  },
137
148
  {
149
+ description:
150
+ '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
138
151
  displayName: 'GPT-4 Turbo Preview (1106)',
139
152
  functionCall: true,
140
153
  id: 'gpt-4-1106-preview',
@@ -145,7 +158,8 @@ const OpenAI: ModelProviderCard = {
145
158
  tokens: 128_000,
146
159
  },
147
160
  {
148
- description: 'Currently points to gpt-4-0613',
161
+ description:
162
+ 'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。',
149
163
  displayName: 'GPT-4',
150
164
  functionCall: true,
151
165
  id: 'gpt-4',
@@ -156,6 +170,8 @@ const OpenAI: ModelProviderCard = {
156
170
  tokens: 8192,
157
171
  },
158
172
  {
173
+ description:
174
+ 'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。',
159
175
  displayName: 'GPT-4 (0613)',
160
176
  functionCall: true,
161
177
  id: 'gpt-4-0613',
@@ -166,7 +182,8 @@ const OpenAI: ModelProviderCard = {
166
182
  tokens: 8192,
167
183
  },
168
184
  {
169
- description: 'Currently points to gpt-4-32k-0613', // Will be discontinued on June 6, 2025
185
+ description:
186
+ 'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。', // Will be discontinued on June 6, 2025
170
187
  displayName: 'GPT-4 32K',
171
188
  functionCall: true,
172
189
  id: 'gpt-4-32k',
@@ -177,7 +194,10 @@ const OpenAI: ModelProviderCard = {
177
194
  tokens: 32_768,
178
195
  },
179
196
  {
180
- displayName: 'GPT-4 32K (0613)', // Will be discontinued on June 6, 2025
197
+ // Will be discontinued on June 6, 2025
198
+ description:
199
+ 'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。',
200
+ displayName: 'GPT-4 32K (0613)',
181
201
  functionCall: true,
182
202
  id: 'gpt-4-32k-0613',
183
203
  pricing: {
@@ -199,6 +219,8 @@ const OpenAI: ModelProviderCard = {
199
219
  tokens: 16_385,
200
220
  },
201
221
  {
222
+ description:
223
+ 'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125',
202
224
  displayName: 'GPT-3.5 Turbo (0125)',
203
225
  functionCall: true,
204
226
  id: 'gpt-3.5-turbo-0125',
@@ -209,6 +231,8 @@ const OpenAI: ModelProviderCard = {
209
231
  tokens: 16_385,
210
232
  },
211
233
  {
234
+ description:
235
+ 'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125',
212
236
  displayName: 'GPT-3.5 Turbo (1106)',
213
237
  functionCall: true,
214
238
  id: 'gpt-3.5-turbo-1106',
@@ -219,6 +243,8 @@ const OpenAI: ModelProviderCard = {
219
243
  tokens: 16_385,
220
244
  },
221
245
  {
246
+ description:
247
+ 'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125',
222
248
  displayName: 'GPT-3.5 Turbo Instruct',
223
249
  id: 'gpt-3.5-turbo-instruct',
224
250
  pricing: {
@@ -228,7 +254,9 @@ const OpenAI: ModelProviderCard = {
228
254
  tokens: 4096,
229
255
  },
230
256
  {
231
- description: 'Currently points to gpt-3.5-turbo-16k-0613', // Will be discontinued on September 13, 2024
257
+ description:
258
+ 'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125', // Will be discontinued on September 13, 2024
259
+
232
260
  displayName: 'GPT-3.5 Turbo 16K',
233
261
  id: 'gpt-3.5-turbo-16k',
234
262
  legacy: true,
@@ -239,7 +267,10 @@ const OpenAI: ModelProviderCard = {
239
267
  tokens: 16_385,
240
268
  },
241
269
  {
242
- displayName: 'GPT-3.5 Turbo (0613)', // Will be discontinued on September 13, 2024
270
+ description:
271
+ 'GPT-3.5 Turbo 是 OpenAI 的一款基础模型,结合了高效性和经济性,广泛用于文本生成、理解和分析,专为指导性提示进行调整,去除了与聊天相关的优化。',
272
+ displayName: 'GPT-3.5 Turbo (0613)',
273
+ // Will be discontinued on September 13, 2024
243
274
  id: 'gpt-3.5-turbo-0613',
244
275
  legacy: true,
245
276
  pricing: {
@@ -249,7 +280,8 @@ const OpenAI: ModelProviderCard = {
249
280
  tokens: 4096,
250
281
  },
251
282
  {
252
- description: 'Currently points to gpt-3.5-turbo-16k-0613', // Will be discontinued on September 13, 2024
283
+ description:
284
+ 'GPT-3.5 Turbo 是 OpenAI 的一款基础模型,结合了高效性和经济性,广泛用于文本生成、理解和分析,专为指导性提示进行调整,去除了与聊天相关的优化。', // Will be discontinued on September 13, 2024
253
285
  id: 'gpt-3.5-turbo-16k-0613',
254
286
  legacy: true,
255
287
  pricing: {
@@ -260,6 +292,8 @@ const OpenAI: ModelProviderCard = {
260
292
  },
261
293
  ],
262
294
  checkModel: 'gpt-4o-mini',
295
+ description:
296
+ 'OpenAI 是全球领先的人工智能研究机构,其开发的模型如GPT系列推动了自然语言处理的前沿。OpenAI 致力于通过创新和高效的AI解决方案改变多个行业。他们的产品具有显著的性能和经济性,广泛用于研究、商业和创新应用。',
263
297
  enabled: true,
264
298
  id: 'openai',
265
299
  modelList: { showModelFetcher: true },
@@ -1,9 +1,11 @@
1
1
  import { ModelProviderCard } from '@/types/llm';
2
2
 
3
- // ref https://openrouter.ai/docs#models
3
+ // ref :https://openrouter.ai/docs#models
4
4
  const OpenRouter: ModelProviderCard = {
5
5
  chatModels: [
6
6
  {
7
+ description:
8
+ '根据上下文长度、主题和复杂性,你的请求将发送到 Llama 3 70B Instruct、Claude 3.5 Sonnet(自我调节)或 GPT-4o。',
7
9
  displayName: 'Auto (best for prompt)',
8
10
  enabled: true,
9
11
  functionCall: false,
@@ -12,6 +14,8 @@ const OpenRouter: ModelProviderCard = {
12
14
  vision: false,
13
15
  },
14
16
  {
17
+ description:
18
+ 'Mistral 7B Instruct 是一款高效的多语言模型,优化用于对话和问答,能在资源受限的环境中表现出色。',
15
19
  displayName: 'Mistral 7B Instruct (free)',
16
20
  enabled: true,
17
21
  functionCall: false,
@@ -20,6 +24,7 @@ const OpenRouter: ModelProviderCard = {
20
24
  vision: false,
21
25
  },
22
26
  {
27
+ description: 'Google 的 Gemma 7B 具有出色的计算效率,适适用于多种硬件架构,如GPU和TPU。',
23
28
  displayName: 'Google: Gemma 7B (free)',
24
29
  enabled: true,
25
30
  functionCall: false,
@@ -28,6 +33,7 @@ const OpenRouter: ModelProviderCard = {
28
33
  vision: false,
29
34
  },
30
35
  {
36
+ description: 'OpenChat 3.5 是一个创新的开源语言模型库,使用C-RLFT策略优化,支持多种任务。',
31
37
  displayName: 'OpenChat 3.5 (free)',
32
38
  enabled: true,
33
39
  functionCall: false,
@@ -36,6 +42,7 @@ const OpenRouter: ModelProviderCard = {
36
42
  vision: false,
37
43
  },
38
44
  {
45
+ description: 'Nous Capybara 7B 专为基础任务设计,提供高效的语言处理能力。',
39
46
  displayName: 'Nous: Capybara 7B (free)',
40
47
  enabled: true,
41
48
  functionCall: false,
@@ -44,6 +51,7 @@ const OpenRouter: ModelProviderCard = {
44
51
  vision: false,
45
52
  },
46
53
  {
54
+ description: 'Hugging Face的Zephyr 7B,以小巧身形实现了超越许多大型模型的性能。',
47
55
  displayName: 'Hugging Face: Zephyr 7B (free)',
48
56
  enabled: true,
49
57
  functionCall: false,
@@ -52,6 +60,7 @@ const OpenRouter: ModelProviderCard = {
52
60
  vision: false,
53
61
  },
54
62
  {
63
+ description: 'MythoMist 7B 为实验性最强的Mistral合并模型,结合了最新算法。',
55
64
  displayName: 'MythoMist 7B (free)',
56
65
  enabled: true,
57
66
  functionCall: false,
@@ -60,6 +69,7 @@ const OpenRouter: ModelProviderCard = {
60
69
  vision: false,
61
70
  },
62
71
  {
72
+ description: 'Toppy M 7B 是一个开源模型,旨在通过开源科学推进人工智能的普及。',
63
73
  displayName: 'Toppy M 7B (free)',
64
74
  enabled: true,
65
75
  functionCall: false,
@@ -68,6 +78,7 @@ const OpenRouter: ModelProviderCard = {
68
78
  vision: false,
69
79
  },
70
80
  {
81
+ description: 'Cinematika 7B 模型将电影剧本转换为小说风格,适用于创意内容生成。',
71
82
  displayName: 'Cinematika 7B (alpha) (free)',
72
83
  enabled: true,
73
84
  functionCall: false,
@@ -76,6 +87,7 @@ const OpenRouter: ModelProviderCard = {
76
87
  vision: false,
77
88
  },
78
89
  {
90
+ description: 'RWKV v5 World 3B 结合了 RNN 和 Transformer,实现了卓越的多语言处理能力。',
79
91
  displayName: 'RWKV v5 World 3B (free)',
80
92
  enabled: true,
81
93
  functionCall: false,
@@ -84,6 +96,7 @@ const OpenRouter: ModelProviderCard = {
84
96
  vision: false,
85
97
  },
86
98
  {
99
+ description: 'RWKV v5 3B AI Town 是为 AI 小镇项目前置量身定制的模型。',
87
100
  displayName: 'RWKV v5 3B AI Town (free)',
88
101
  enabled: true,
89
102
  functionCall: false,
@@ -92,6 +105,7 @@ const OpenRouter: ModelProviderCard = {
92
105
  vision: false,
93
106
  },
94
107
  {
108
+ description: 'RWKV v5 Eagle 7B 以超小成本实现高效的多语言翻译和处理,适用于边缘计算。',
95
109
  displayName: 'RWKV v5: Eagle 7B (free)',
96
110
  enabled: true,
97
111
  functionCall: false,
@@ -100,6 +114,7 @@ const OpenRouter: ModelProviderCard = {
100
114
  vision: false,
101
115
  },
102
116
  {
117
+ description: 'Mistral Mixtral 8x22B 提供高性能的基础模型。',
103
118
  displayName: 'Mistral: Mixtral 8x22B (base)',
104
119
  enabled: true,
105
120
  functionCall: false,
@@ -108,6 +123,7 @@ const OpenRouter: ModelProviderCard = {
108
123
  vision: false,
109
124
  },
110
125
  {
126
+ description: '微软的 WizardLM-2 8x22B 具有高容量和高效能特性。',
111
127
  displayName: 'Microsoft: WizardLM-2 8x22B',
112
128
  enabled: true,
113
129
  functionCall: false,
@@ -117,9 +133,13 @@ const OpenRouter: ModelProviderCard = {
117
133
  },
118
134
  ],
119
135
  checkModel: 'mistralai/mistral-7b-instruct:free',
136
+ description:
137
+ 'OpenRouter 是一个提供多种前沿大模型接口的服务平台,支持 OpenAI、Anthropic、LLaMA 及更多,适合多样化的开发和应用需求。用户可根据自身需求灵活选择最优的模型和价格,助力AI体验的提升。',
120
138
  id: 'openrouter',
121
139
  modelList: { showModelFetcher: true },
140
+ modelsUrl: 'https://openrouter.ai/models',
122
141
  name: 'OpenRouter',
142
+ url: 'https://openrouter.ai',
123
143
  };
124
144
 
125
145
  export default OpenRouter;
@@ -1,55 +1,71 @@
1
1
  import { ModelProviderCard } from '@/types/llm';
2
2
 
3
- // ref https://docs.perplexity.ai/docs/model-cards
3
+ // ref :https://docs.perplexity.ai/docs/model-cards
4
4
  const Perplexity: ModelProviderCard = {
5
5
  chatModels: [
6
6
  {
7
+ description:
8
+ 'Llama 3.1 Sonar Small Online 模型,具备8B参数,支持约127,000个标记的上下文长度,专为在线聊天设计,能高效处理各种文本交互。',
7
9
  displayName: 'Llama 3.1 Sonar Small Online',
8
10
  enabled: true,
9
11
  id: 'llama-3.1-sonar-small-128k-online',
10
12
  tokens: 128_000,
11
13
  },
12
14
  {
15
+ description:
16
+ 'Llama 3.1 Sonar Large Online 模型,具备70B参数,支持约127,000个标记的上下文长度,适用于高容量和多样化聊天任务。',
13
17
  displayName: 'Llama 3.1 Sonar Large Online',
14
18
  enabled: true,
15
19
  id: 'llama-3.1-sonar-large-128k-online',
16
20
  tokens: 128_000,
17
21
  },
18
22
  {
23
+ description:
24
+ 'Llama 3.1 Sonar Huge Online 模型,具备405B参数,支持约127,000个标记的上下文长度,设计用于复杂的在线聊天应用。',
19
25
  displayName: 'Llama 3.1 Sonar Huge Online',
20
26
  enabled: true,
21
27
  id: 'llama-3.1-sonar-huge-128k-online',
22
28
  tokens: 128_000,
23
29
  },
24
30
  {
31
+ description:
32
+ 'Llama 3.1 Sonar Small Chat 模型,具备8B参数,专为离线聊天设计,支持约127,000个标记的上下文长度。',
25
33
  displayName: 'Llama 3.1 Sonar Small Chat',
26
34
  enabled: true,
27
35
  id: 'llama-3.1-sonar-small-128k-chat',
28
36
  tokens: 128_000,
29
37
  },
30
38
  {
39
+ description:
40
+ 'Llama 3.1 Sonar Large Chat 模型,具备70B参数,支持约127,000个标记的上下文长度,适合于复杂的离线聊天任务。',
31
41
  displayName: 'Llama 3.1 Sonar Large Chat',
32
42
  enabled: true,
33
43
  id: 'llama-3.1-sonar-large-128k-chat',
34
44
  tokens: 128_000,
35
45
  },
36
46
  {
37
- displayName: 'Llama 3.1 8B Instruct',
47
+ description:
48
+ 'Llama 3.1 8B Instruct 模型,具备8B参数,支持画面指示任务的高效执行,提供优质的文本生成能力。',
38
49
  id: 'llama-3.1-8b-instruct',
39
50
  tokens: 128_000,
40
51
  },
41
52
  {
42
- displayName: 'Llama 3.1 70B Instruct',
53
+ description:
54
+ 'Llama 3.1 70B Instruct 模型,具备70B参数,能在大型文本生成和指示任务中提供卓越性能。',
43
55
  id: 'llama-3.1-70b-instruct',
44
56
  tokens: 128_000,
45
57
  },
46
58
  ],
47
59
  checkModel: 'llama-3.1-8b-instruct',
60
+ description:
61
+ 'Perplexity 是一家领先的对话生成模型提供商,提供多种先进的Llama 3.1模型,支持在线和离线应用,特别适用于复杂的自然语言处理任务。',
48
62
  id: 'perplexity',
63
+ modelsUrl: 'https://docs.perplexity.ai/guides/model-cards',
49
64
  name: 'Perplexity',
50
65
  proxyUrl: {
51
66
  placeholder: 'https://api.perplexity.ai',
52
67
  },
68
+ url: 'https://www.perplexity.ai',
53
69
  };
54
70
 
55
71
  export default Perplexity;
@@ -1,10 +1,11 @@
1
1
  import { ModelProviderCard } from '@/types/llm';
2
2
 
3
- // ref https://help.aliyun.com/zh/dashscope/developer-reference/api-details
3
+ // ref :https://help.aliyun.com/zh/dashscope/developer-reference/api-details
4
4
  const Qwen: ModelProviderCard = {
5
5
  chatModels: [
6
6
  {
7
- description: '通义千问超大规模语言模型,支持长文本上下文,以及基于长文档、多文档等多个场景的对话功能。',
7
+ description:
8
+ '通义千问超大规模语言模型,支持长文本上下文,以及基于长文档、多文档等多个场景的对话功能。',
8
9
  displayName: 'Qwen Long',
9
10
  enabled: true,
10
11
  id: 'qwen-long',
@@ -61,7 +62,7 @@ const Qwen: ModelProviderCard = {
61
62
  tokens: 32_768,
62
63
  vision: true,
63
64
  },
64
- // ref https://help.aliyun.com/zh/dashscope/developer-reference/tongyi-qianwen-7b-14b-72b-api-detailes
65
+ // ref :https://help.aliyun.com/zh/dashscope/developer-reference/tongyi-qianwen-7b-14b-72b-api-detailes
65
66
  {
66
67
  description: '通义千问2对外开源的7B规模的模型',
67
68
  displayName: 'Qwen2 7B',
@@ -87,16 +88,14 @@ const Qwen: ModelProviderCard = {
87
88
  tokens: 4096, // https://help.aliyun.com/zh/dashscope/developer-reference/use-qwen2-math-by-calling-api
88
89
  },
89
90
  {
90
- description:
91
- '以 Qwen-7B 语言模型初始化,添加图像模型,图像输入分辨率为448的预训练模型。',
91
+ description: '以 Qwen-7B 语言模型初始化,添加图像模型,图像输入分辨率为448的预训练模型。',
92
92
  displayName: 'Qwen VL',
93
93
  id: 'qwen-vl-v1',
94
94
  tokens: 8192, // https://huggingface.co/Qwen/Qwen-VL/blob/main/config.json
95
95
  vision: true,
96
96
  },
97
97
  {
98
- description:
99
- '通义千问VL支持灵活的交互方式,包括多图、多轮问答、创作等能力的模型。',
98
+ description: '通义千问VL支持灵活的交互方式,包括多图、多轮问答、创作等能力的模型。',
100
99
  displayName: 'Qwen VL Chat',
101
100
  id: 'qwen-vl-chat-v1',
102
101
  tokens: 8192, // https://huggingface.co/Qwen/Qwen-VL-Chat/blob/main/config.json
@@ -104,14 +103,18 @@ const Qwen: ModelProviderCard = {
104
103
  },
105
104
  ],
106
105
  checkModel: 'qwen-turbo',
107
- disableBrowserRequest: true, // CORS issue
106
+ description:
107
+ '通义千问是阿里云自主研发的超大规模语言模型,具有强大的自然语言理解和生成能力。它可以回答各种问题、创作文字内容、表达观点看法、撰写代码等,在多个领域发挥作用。',
108
+ disableBrowserRequest: true,
108
109
  id: 'qwen',
109
110
  modelList: { showModelFetcher: true },
111
+ modelsUrl: 'https://help.aliyun.com/zh/dashscope/developer-reference/api-details',
110
112
  name: 'Qwen',
111
113
  smoothing: {
112
114
  speed: 2,
113
115
  text: true,
114
116
  },
117
+ url: 'https://tongyi.aliyun.com',
115
118
  };
116
119
 
117
120
  export default Qwen;