@lobehub/chat 1.40.0 → 1.40.2

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.
Files changed (110) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/changelog/v1.json +18 -0
  3. package/package.json +1 -1
  4. package/src/app/(main)/chat/(workspace)/_layout/Desktop/HotKeys.tsx +7 -0
  5. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/Actions.tsx +1 -1
  6. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/Header.tsx +1 -1
  7. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/InfoSidebar/SuggestionItem.tsx +2 -2
  8. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/ProviderList/ProviderItem.tsx +1 -1
  9. package/src/app/(main)/discover/(detail)/provider/[slug]/features/ModelList/ModelItem.tsx +3 -3
  10. package/src/app/(main)/discover/(list)/models/features/Card.tsx +6 -2
  11. package/src/app/(main)/settings/llm/ProviderList/Cloudflare/index.tsx +1 -5
  12. package/src/app/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx +2 -2
  13. package/src/components/ModelSelect/index.tsx +7 -4
  14. package/src/config/__tests__/app.test.ts +6 -2
  15. package/src/config/app.ts +1 -2
  16. package/src/config/modelProviders/ai21.ts +2 -2
  17. package/src/config/modelProviders/ai360.ts +4 -4
  18. package/src/config/modelProviders/anthropic.ts +8 -8
  19. package/src/config/modelProviders/azure.ts +5 -5
  20. package/src/config/modelProviders/baichuan.ts +6 -6
  21. package/src/config/modelProviders/bedrock.ts +14 -14
  22. package/src/config/modelProviders/cloudflare.ts +12 -11
  23. package/src/config/modelProviders/deepseek.ts +1 -1
  24. package/src/config/modelProviders/fireworksai.ts +29 -27
  25. package/src/config/modelProviders/giteeai.ts +7 -7
  26. package/src/config/modelProviders/github.ts +29 -28
  27. package/src/config/modelProviders/google.ts +18 -19
  28. package/src/config/modelProviders/groq.ts +13 -13
  29. package/src/config/modelProviders/higress.ts +195 -194
  30. package/src/config/modelProviders/huggingface.ts +7 -7
  31. package/src/config/modelProviders/hunyuan.ts +25 -17
  32. package/src/config/modelProviders/internlm.ts +6 -4
  33. package/src/config/modelProviders/minimax.ts +5 -5
  34. package/src/config/modelProviders/mistral.ts +14 -16
  35. package/src/config/modelProviders/moonshot.ts +3 -3
  36. package/src/config/modelProviders/novita.ts +15 -15
  37. package/src/config/modelProviders/ollama.ts +46 -46
  38. package/src/config/modelProviders/openai.ts +23 -22
  39. package/src/config/modelProviders/openrouter.ts +20 -18
  40. package/src/config/modelProviders/perplexity.ts +7 -7
  41. package/src/config/modelProviders/qwen.ts +23 -25
  42. package/src/config/modelProviders/sensenova.ts +8 -8
  43. package/src/config/modelProviders/siliconcloud.ts +138 -92
  44. package/src/config/modelProviders/spark.ts +6 -6
  45. package/src/config/modelProviders/stepfun.ts +9 -9
  46. package/src/config/modelProviders/taichu.ts +2 -3
  47. package/src/config/modelProviders/togetherai.ts +57 -48
  48. package/src/config/modelProviders/upstage.ts +3 -3
  49. package/src/config/modelProviders/wenxin.ts +12 -12
  50. package/src/config/modelProviders/xai.ts +4 -4
  51. package/src/config/modelProviders/zeroone.ts +11 -11
  52. package/src/config/modelProviders/zhipu.ts +17 -16
  53. package/src/const/hotkeys.ts +1 -0
  54. package/src/database/_deprecated/core/model.ts +1 -1
  55. package/src/database/_deprecated/models/sessionGroup.ts +4 -1
  56. package/src/database/client/migrations.json +2 -5
  57. package/src/database/migrations/meta/0012_snapshot.json +176 -518
  58. package/src/database/schemas/agent.ts +1 -1
  59. package/src/database/schemas/message.ts +1 -0
  60. package/src/database/schemas/session.ts +1 -0
  61. package/src/database/server/models/topic.ts +19 -17
  62. package/src/features/DebugUI/Content.tsx +0 -1
  63. package/src/features/PluginStore/index.tsx +2 -2
  64. package/src/layout/GlobalProvider/AntdV5MonkeyPatch.tsx +4 -4
  65. package/src/libs/agent-runtime/google/index.ts +4 -3
  66. package/src/libs/agent-runtime/higress/index.ts +1 -1
  67. package/src/libs/agent-runtime/huggingface/index.ts +2 -4
  68. package/src/libs/agent-runtime/minimax/index.ts +5 -10
  69. package/src/libs/agent-runtime/mistral/index.ts +3 -6
  70. package/src/libs/agent-runtime/moonshot/index.ts +3 -6
  71. package/src/libs/agent-runtime/novita/__snapshots__/index.test.ts.snap +18 -18
  72. package/src/libs/agent-runtime/novita/index.ts +1 -1
  73. package/src/libs/agent-runtime/openai/__snapshots__/index.test.ts.snap +10 -10
  74. package/src/libs/agent-runtime/openai/index.ts +2 -0
  75. package/src/libs/agent-runtime/openrouter/__snapshots__/index.test.ts.snap +168 -168
  76. package/src/libs/agent-runtime/openrouter/index.ts +1 -1
  77. package/src/libs/agent-runtime/perplexity/index.ts +4 -4
  78. package/src/libs/agent-runtime/sensenova/index.ts +9 -3
  79. package/src/libs/agent-runtime/taichu/index.ts +4 -10
  80. package/src/libs/agent-runtime/utils/streams/minimax.test.ts +5 -2
  81. package/src/libs/agent-runtime/utils/streams/minimax.ts +4 -1
  82. package/src/libs/agent-runtime/zhipu/index.ts +12 -13
  83. package/src/libs/langchain/loaders/index.ts +2 -2
  84. package/src/libs/langchain/types.ts +9 -1
  85. package/src/locales/default/modelProvider.ts +1 -1
  86. package/src/migrations/FromV3ToV4/fixtures/ollama-output-v4.json +1 -1
  87. package/src/migrations/FromV6ToV7/types/v7.ts +0 -2
  88. package/src/server/globalConfig/genServerLLMConfig.test.ts +4 -4
  89. package/src/server/globalConfig/genServerLLMConfig.ts +29 -24
  90. package/src/server/globalConfig/index.ts +1 -2
  91. package/src/server/routers/edge/config/__snapshots__/index.test.ts.snap +9 -9
  92. package/src/server/routers/lambda/_template.ts +1 -1
  93. package/src/server/routers/lambda/knowledgeBase.ts +1 -1
  94. package/src/server/routers/lambda/session.ts +1 -1
  95. package/src/server/routers/lambda/sessionGroup.ts +1 -1
  96. package/src/server/routers/lambda/thread.ts +1 -1
  97. package/src/server/services/nextAuthUser/index.ts +1 -1
  98. package/src/store/user/slices/modelList/__snapshots__/action.test.ts.snap +1 -1
  99. package/src/store/user/slices/modelList/action.test.ts +4 -4
  100. package/src/store/user/slices/modelList/reducers/customModelCard.test.ts +6 -6
  101. package/src/store/user/slices/modelList/selectors/modelProvider.ts +3 -2
  102. package/src/tools/dalle/Render/Item/index.tsx +1 -1
  103. package/src/types/files/index.ts +0 -1
  104. package/src/types/llm.ts +4 -5
  105. package/src/utils/__snapshots__/parseModels.test.ts.snap +2 -2
  106. package/src/utils/genUserLLMConfig.test.ts +4 -4
  107. package/src/utils/genUserLLMConfig.ts +6 -4
  108. package/src/utils/parseModels.test.ts +16 -16
  109. package/src/utils/parseModels.ts +1 -1
  110. package/src/utils/server/jwt.ts +2 -6
@@ -5,26 +5,28 @@ import { ModelProviderCard } from '@/types/llm';
5
5
  const Github: ModelProviderCard = {
6
6
  chatModels: [
7
7
  {
8
- description: '专注于高级推理和解决复杂问题,包括数学和科学任务。非常适合需要深入上下文理解和代理工作流程的应用程序。',
8
+ contextWindowTokens: 200_000,
9
+ description:
10
+ '专注于高级推理和解决复杂问题,包括数学和科学任务。非常适合需要深入上下文理解和代理工作流程的应用程序。',
9
11
  displayName: 'OpenAI o1',
10
12
  enabled: true,
11
13
  functionCall: false,
12
14
  id: 'o1',
13
15
  maxOutput: 100_000,
14
- tokens: 200_000,
15
16
  vision: true,
16
17
  },
17
18
  {
19
+ contextWindowTokens: 128_000,
18
20
  description: '比 o1-preview 更小、更快,成本低80%,在代码生成和小上下文操作方面表现良好。',
19
21
  displayName: 'OpenAI o1-mini',
20
22
  enabled: true,
21
23
  functionCall: false,
22
24
  id: 'o1-mini',
23
25
  maxOutput: 65_536,
24
- tokens: 128_000,
25
26
  vision: true,
26
27
  },
27
28
  {
29
+ contextWindowTokens: 128_000,
28
30
  description:
29
31
  '专注于高级推理和解决复杂问题,包括数学和科学任务。非常适合需要深度上下文理解和自主工作流程的应用。',
30
32
  displayName: 'OpenAI o1-preview',
@@ -32,195 +34,194 @@ const Github: ModelProviderCard = {
32
34
  functionCall: false,
33
35
  id: 'o1-preview',
34
36
  maxOutput: 32_768,
35
- tokens: 128_000,
36
37
  vision: true,
37
38
  },
38
39
  {
40
+ contextWindowTokens: 128_000,
39
41
  description: '一种经济高效的AI解决方案,适用于多种文本和图像任务。',
40
42
  displayName: 'OpenAI GPT-4o mini',
41
43
  enabled: true,
42
44
  functionCall: true,
43
45
  id: 'gpt-4o-mini',
44
46
  maxOutput: 4096,
45
- tokens: 128_000,
46
47
  vision: true,
47
48
  },
48
49
  {
50
+ contextWindowTokens: 128_000,
49
51
  description: 'OpenAI GPT-4系列中最先进的多模态模型,可以处理文本和图像输入。',
50
52
  displayName: 'OpenAI GPT-4o',
51
53
  enabled: true,
52
54
  functionCall: true,
53
55
  id: 'gpt-4o',
54
56
  maxOutput: 4096,
55
- tokens: 128_000,
56
57
  vision: true,
57
58
  },
58
59
  {
60
+ contextWindowTokens: 262_144,
59
61
  description:
60
62
  '一个52B参数(12B活跃)的多语言模型,提供256K长上下文窗口、函数调用、结构化输出和基于事实的生成。',
61
63
  displayName: 'AI21 Jamba 1.5 Mini',
62
64
  functionCall: true,
63
65
  id: 'ai21-jamba-1.5-mini',
64
66
  maxOutput: 4096,
65
- tokens: 262_144,
66
67
  },
67
68
  {
69
+ contextWindowTokens: 262_144,
68
70
  description:
69
71
  '一个398B参数(94B活跃)的多语言模型,提供256K长上下文窗口、函数调用、结构化输出和基于事实的生成。',
70
72
  displayName: 'AI21 Jamba 1.5 Large',
71
73
  functionCall: true,
72
74
  id: 'ai21-jamba-1.5-large',
73
75
  maxOutput: 4096,
74
- tokens: 262_144,
75
76
  },
76
77
  {
78
+ contextWindowTokens: 131_072,
77
79
  description:
78
80
  'Command R是一个可扩展的生成模型,旨在针对RAG和工具使用,使企业能够实现生产级AI。',
79
81
  displayName: 'Cohere Command R',
80
82
  id: 'cohere-command-r',
81
83
  maxOutput: 4096,
82
- tokens: 131_072,
83
84
  },
84
85
  {
86
+ contextWindowTokens: 131_072,
85
87
  description: 'Command R+是一个最先进的RAG优化模型,旨在应对企业级工作负载。',
86
88
  displayName: 'Cohere Command R+',
87
89
  id: 'cohere-command-r-plus',
88
90
  maxOutput: 4096,
89
- tokens: 131_072,
90
91
  },
91
92
  {
93
+ contextWindowTokens: 131_072,
92
94
  description:
93
95
  'Mistral Nemo是一种尖端的语言模型(LLM),在其尺寸类别中拥有最先进的推理、世界知识和编码能力。',
94
96
  displayName: 'Mistral Nemo',
95
97
  id: 'mistral-nemo',
96
98
  maxOutput: 4096,
97
- tokens: 131_072,
98
99
  },
99
100
  {
101
+ contextWindowTokens: 131_072,
100
102
  description: 'Mistral Small可用于任何需要高效率和低延迟的基于语言的任务。',
101
103
  displayName: 'Mistral Small',
102
104
  id: 'mistral-small',
103
105
  maxOutput: 4096,
104
- tokens: 131_072,
105
106
  },
106
107
  {
108
+ contextWindowTokens: 131_072,
107
109
  description:
108
110
  'Mistral的旗舰模型,适合需要大规模推理能力或高度专业化的复杂任务(合成文本生成、代码生成、RAG或代理)。',
109
111
  displayName: 'Mistral Large',
110
112
  id: 'mistral-large',
111
113
  maxOutput: 4096,
112
- tokens: 131_072,
113
114
  },
114
115
  {
116
+ contextWindowTokens: 131_072,
115
117
  description: '在高分辨率图像上表现出色的图像推理能力,适用于视觉理解应用。',
116
118
  displayName: 'Llama 3.2 11B Vision',
117
119
  id: 'llama-3.2-11b-vision-instruct',
118
120
  maxOutput: 4096,
119
- tokens: 131_072,
120
121
  vision: true,
121
122
  },
122
123
  {
124
+ contextWindowTokens: 131_072,
123
125
  description: '适用于视觉理解代理应用的高级图像推理能力。',
124
126
  displayName: 'Llama 3.2 90B Vision',
125
127
  id: 'llama-3.2-90b-vision-instruct',
126
128
  maxOutput: 4096,
127
- tokens: 131_072,
128
129
  vision: true,
129
130
  },
130
131
  {
132
+ contextWindowTokens: 131_072,
131
133
  description:
132
134
  'Llama 3.1指令调优的文本模型,针对多语言对话用例进行了优化,在许多可用的开源和封闭聊天模型中,在常见行业基准上表现优异。',
133
135
  displayName: 'Meta Llama 3.1 8B',
134
136
  id: 'meta-llama-3.1-8b-instruct',
135
137
  maxOutput: 4096,
136
- tokens: 131_072,
137
138
  },
138
139
  {
140
+ contextWindowTokens: 131_072,
139
141
  description:
140
142
  'Llama 3.1指令调优的文本模型,针对多语言对话用例进行了优化,在许多可用的开源和封闭聊天模型中,在常见行业基准上表现优异。',
141
143
  displayName: 'Meta Llama 3.1 70B',
142
144
  id: 'meta-llama-3.1-70b-instruct',
143
145
  maxOutput: 4096,
144
- tokens: 131_072,
145
146
  },
146
147
  {
148
+ contextWindowTokens: 131_072,
147
149
  description:
148
150
  'Llama 3.1指令调优的文本模型,针对多语言对话用例进行了优化,在许多可用的开源和封闭聊天模型中,在常见行业基准上表现优异。',
149
151
  displayName: 'Meta Llama 3.1 405B',
150
152
  id: 'meta-llama-3.1-405b-instruct',
151
153
  maxOutput: 4096,
152
- tokens: 131_072,
153
154
  },
154
155
  {
156
+ contextWindowTokens: 8192,
155
157
  description: '一个多功能的80亿参数模型,针对对话和文本生成任务进行了优化。',
156
158
  displayName: 'Meta Llama 3 8B',
157
159
  id: 'meta-llama-3-8b-instruct',
158
160
  maxOutput: 4096,
159
- tokens: 8192,
160
161
  },
161
162
  {
163
+ contextWindowTokens: 8192,
162
164
  description: '一个强大的700亿参数模型,在推理、编码和广泛的语言应用方面表现出色。',
163
165
  displayName: 'Meta Llama 3 70B',
164
166
  id: 'meta-llama-3-70b-instruct',
165
167
  maxOutput: 4096,
166
- tokens: 8192,
167
168
  },
168
169
  {
170
+ contextWindowTokens: 131_072,
169
171
  description: 'Phi-3-mini模型的更新版。',
170
172
  displayName: 'Phi-3.5-mini 128K',
171
173
  id: 'Phi-3.5-mini-instruct',
172
174
  maxOutput: 4096,
173
- tokens: 131_072,
174
175
  },
175
176
  {
177
+ contextWindowTokens: 131_072,
176
178
  description: 'Phi-3-vision模型的更新版。',
177
179
  displayName: 'Phi-3.5-vision 128K',
178
180
  id: 'Phi-3.5-vision-instrust',
179
181
  maxOutput: 4096,
180
- tokens: 131_072,
181
182
  vision: true,
182
183
  },
183
184
  {
185
+ contextWindowTokens: 4096,
184
186
  description: 'Phi-3家族中最小的成员,针对质量和低延迟进行了优化。',
185
187
  displayName: 'Phi-3-mini 4K',
186
188
  id: 'Phi-3-mini-4k-instruct',
187
189
  maxOutput: 4096,
188
- tokens: 4096,
189
190
  },
190
191
  {
192
+ contextWindowTokens: 131_072,
191
193
  description: '相同的Phi-3-mini模型,但具有更大的上下文大小,适用于RAG或少量提示。',
192
194
  displayName: 'Phi-3-mini 128K',
193
195
  id: 'Phi-3-mini-128k-instruct',
194
196
  maxOutput: 4096,
195
- tokens: 131_072,
196
197
  },
197
198
  {
199
+ contextWindowTokens: 8192,
198
200
  description: '一个70亿参数模型,质量优于Phi-3-mini,重点关注高质量、推理密集型数据。',
199
201
  displayName: 'Phi-3-small 8K',
200
202
  id: 'Phi-3-small-8k-instruct',
201
203
  maxOutput: 4096,
202
- tokens: 8192,
203
204
  },
204
205
  {
206
+ contextWindowTokens: 131_072,
205
207
  description: '相同的Phi-3-small模型,但具有更大的上下文大小,适用于RAG或少量提示。',
206
208
  displayName: 'Phi-3-small 128K',
207
209
  id: 'Phi-3-small-128k-instruct',
208
210
  maxOutput: 4096,
209
- tokens: 131_072,
210
211
  },
211
212
  {
213
+ contextWindowTokens: 4096,
212
214
  description: '一个140亿参数模型,质量优于Phi-3-mini,重点关注高质量、推理密集型数据。',
213
215
  displayName: 'Phi-3-medium 4K',
214
216
  id: 'Phi-3-medium-4k-instruct',
215
217
  maxOutput: 4096,
216
- tokens: 4096,
217
218
  },
218
219
  {
220
+ contextWindowTokens: 131_072,
219
221
  description: '相同的Phi-3-medium模型,但具有更大的上下文大小,适用于RAG或少量提示。',
220
222
  displayName: 'Phi-3-medium 128K',
221
223
  id: 'Phi-3-medium-128k-instruct',
222
224
  maxOutput: 4096,
223
- tokens: 131_072,
224
225
  },
225
226
  ],
226
227
  checkModel: 'Phi-3-mini-4k-instruct',
@@ -4,6 +4,7 @@ import { ModelProviderCard } from '@/types/llm';
4
4
  const Google: ModelProviderCard = {
5
5
  chatModels: [
6
6
  {
7
+ contextWindowTokens: 32_767 + 8192,
7
8
  description:
8
9
  'Gemini 2.0 Flash Exp 是 Google 最新的实验性多模态AI模型,拥有下一代特性,卓越的速度,原生工具调用以及多模态生成。',
9
10
  displayName: 'Gemini 2.0 Flash Thinking Experimental 1219',
@@ -17,10 +18,10 @@ const Google: ModelProviderCard = {
17
18
  output: 0,
18
19
  },
19
20
  releasedAt: '2024-12-19',
20
- tokens: 32_767 + 8192,
21
21
  vision: true,
22
22
  },
23
23
  {
24
+ contextWindowTokens: 1_048_576 + 8192,
24
25
  description:
25
26
  'Gemini 2.0 Flash Exp 是 Google 最新的实验性多模态AI模型,拥有下一代特性,卓越的速度,原生工具调用以及多模态生成。',
26
27
  displayName: 'Gemini 2.0 Flash Experimental',
@@ -34,10 +35,10 @@ const Google: ModelProviderCard = {
34
35
  output: 0,
35
36
  },
36
37
  releasedAt: '2024-12-11',
37
- tokens: 1_048_576 + 8192,
38
38
  vision: true,
39
39
  },
40
40
  {
41
+ contextWindowTokens: 2_097_152 + 8192,
41
42
  description:
42
43
  'Gemini Exp 1206 是 Google 最新的实验性多模态AI模型,与历史版本相比有一定的质量提升。',
43
44
  displayName: 'Gemini Experimental 1206',
@@ -51,10 +52,10 @@ const Google: ModelProviderCard = {
51
52
  output: 0,
52
53
  },
53
54
  releasedAt: '2024-12-06',
54
- tokens: 2_097_152 + 8192,
55
55
  vision: true,
56
56
  },
57
57
  {
58
+ contextWindowTokens: 32_767 + 8192,
58
59
  description:
59
60
  'Gemini Exp 1121 是 Google 的实验性多模态AI模型,拥有改进的编码、推理和视觉能力。',
60
61
  displayName: 'Gemini Experimental 1121',
@@ -67,12 +68,11 @@ const Google: ModelProviderCard = {
67
68
  output: 0,
68
69
  },
69
70
  releasedAt: '2024-11-21',
70
- tokens: 32_767 + 8192,
71
71
  vision: true,
72
72
  },
73
73
  {
74
- description:
75
- 'Gemini Exp 1114 是 Google 的实验性多模态AI模型,对输出质量有一定改进。',
74
+ contextWindowTokens: 32_767 + 8192,
75
+ description: 'Gemini Exp 1114 是 Google 的实验性多模态AI模型,对输出质量有一定改进。',
76
76
  displayName: 'Gemini Experimental 1114',
77
77
  functionCall: true,
78
78
  id: 'gemini-exp-1114',
@@ -83,10 +83,10 @@ const Google: ModelProviderCard = {
83
83
  output: 0,
84
84
  },
85
85
  releasedAt: '2024-11-14',
86
- tokens: 32_767 + 8192,
87
86
  vision: true,
88
87
  },
89
88
  {
89
+ contextWindowTokens: 32_767 + 8192,
90
90
  description:
91
91
  'LearnLM 是一个实验性的、特定于任务的语言模型,经过训练以符合学习科学原则,可在教学和学习场景中遵循系统指令,充当专家导师等。',
92
92
  displayName: 'LearnLM 1.5 Pro Experimental',
@@ -99,10 +99,10 @@ const Google: ModelProviderCard = {
99
99
  output: 0,
100
100
  },
101
101
  releasedAt: '2024-11-19',
102
- tokens: 32_767 + 8192,
103
102
  vision: true,
104
103
  },
105
104
  {
105
+ contextWindowTokens: 1_000_000 + 8192,
106
106
  description:
107
107
  'Gemini 1.5 Flash 是 Google 最新的多模态AI模型,具备快速处理能力,支持文本、图像和视频输入,适用于多种任务的高效扩展。',
108
108
  displayName: 'Gemini 1.5 Flash',
@@ -115,10 +115,10 @@ const Google: ModelProviderCard = {
115
115
  input: 0.075,
116
116
  output: 0.3,
117
117
  },
118
- tokens: 1_000_000 + 8192,
119
118
  vision: true,
120
119
  },
121
120
  {
121
+ contextWindowTokens: 1_000_000 + 8192,
122
122
  description: 'Gemini 1.5 Flash 002 是一款高效的多模态模型,支持广泛应用的扩展。',
123
123
  displayName: 'Gemini 1.5 Flash 002',
124
124
  enabled: true,
@@ -131,10 +131,10 @@ const Google: ModelProviderCard = {
131
131
  output: 0.3,
132
132
  },
133
133
  releasedAt: '2024-09-25',
134
- tokens: 1_000_000 + 8192,
135
134
  vision: true,
136
135
  },
137
136
  {
137
+ contextWindowTokens: 1_000_000 + 8192,
138
138
  description: 'Gemini 1.5 Flash 001 是一款高效的多模态模型,支持广泛应用的扩展。',
139
139
  displayName: 'Gemini 1.5 Flash 001',
140
140
  functionCall: true,
@@ -145,10 +145,10 @@ const Google: ModelProviderCard = {
145
145
  input: 0.075,
146
146
  output: 0.3,
147
147
  },
148
- tokens: 1_000_000 + 8192,
149
148
  vision: true,
150
149
  },
151
150
  {
151
+ contextWindowTokens: 2_000_000 + 8192,
152
152
  description:
153
153
  'Gemini 1.5 Pro 支持高达200万个tokens,是中型多模态模型的理想选择,适用于复杂任务的多方面支持。',
154
154
  displayName: 'Gemini 1.5 Pro',
@@ -162,10 +162,10 @@ const Google: ModelProviderCard = {
162
162
  output: 10.5,
163
163
  },
164
164
  releasedAt: '2024-02-15',
165
- tokens: 2_000_000 + 8192,
166
165
  vision: true,
167
166
  },
168
167
  {
168
+ contextWindowTokens: 2_000_000 + 8192,
169
169
  description:
170
170
  'Gemini 1.5 Pro 002 是最新的生产就绪模型,提供更高质量的输出,特别在数学、长上下文和视觉任务方面有显著提升。',
171
171
  displayName: 'Gemini 1.5 Pro 002',
@@ -179,10 +179,10 @@ const Google: ModelProviderCard = {
179
179
  output: 2.5,
180
180
  },
181
181
  releasedAt: '2024-09-24',
182
- tokens: 2_000_000 + 8192,
183
182
  vision: true,
184
183
  },
185
184
  {
185
+ contextWindowTokens: 2_000_000 + 8192,
186
186
  description: 'Gemini 1.5 Pro 001 是可扩展的多模态AI解决方案,支持广泛的复杂任务。',
187
187
  displayName: 'Gemini 1.5 Pro 001',
188
188
  functionCall: true,
@@ -194,10 +194,10 @@ const Google: ModelProviderCard = {
194
194
  output: 10.5,
195
195
  },
196
196
  releasedAt: '2024-02-15',
197
- tokens: 2_000_000 + 8192,
198
197
  vision: true,
199
198
  },
200
199
  {
200
+ contextWindowTokens: 1_000_000 + 8192,
201
201
  description: 'Gemini 1.5 Flash 8B 是一款高效的多模态模型,支持广泛应用的扩展。',
202
202
  displayName: 'Gemini 1.5 Flash 8B',
203
203
  enabled: true,
@@ -210,10 +210,10 @@ const Google: ModelProviderCard = {
210
210
  output: 0.3,
211
211
  },
212
212
  releasedAt: '2024-10-03',
213
- tokens: 1_000_000 + 8192,
214
213
  vision: true,
215
214
  },
216
215
  {
216
+ contextWindowTokens: 1_000_000 + 8192,
217
217
  description:
218
218
  'Gemini 1.5 Flash 8B 0924 是最新的实验性模型,在文本和多模态用例中都有显著的性能提升。',
219
219
  displayName: 'Gemini 1.5 Flash 8B 0924',
@@ -226,11 +226,11 @@ const Google: ModelProviderCard = {
226
226
  output: 0.3,
227
227
  },
228
228
  releasedAt: '2024-09-24',
229
- tokens: 1_000_000 + 8192,
230
229
  vision: true,
231
230
  },
232
231
  // Gemini 1.0 Pro will be removed on 2025.02.15
233
232
  {
233
+ contextWindowTokens: 30_720 + 2048,
234
234
  description: 'Gemini 1.0 Pro 是Google的高性能AI模型,专为广泛任务扩展而设计。',
235
235
  displayName: 'Gemini 1.0 Pro',
236
236
  id: 'gemini-1.0-pro-latest',
@@ -240,9 +240,9 @@ const Google: ModelProviderCard = {
240
240
  output: 1.5,
241
241
  },
242
242
  releasedAt: '2023-12-06',
243
- tokens: 30_720 + 2048,
244
243
  },
245
244
  {
245
+ contextWindowTokens: 30_720 + 2048,
246
246
  description:
247
247
  'Gemini 1.0 Pro 001 (Tuning) 提供稳定并可调优的性能,是复杂任务解决方案的理想选择。',
248
248
  displayName: 'Gemini 1.0 Pro 001 (Tuning)',
@@ -254,9 +254,9 @@ const Google: ModelProviderCard = {
254
254
  output: 1.5,
255
255
  },
256
256
  releasedAt: '2023-12-06',
257
- tokens: 30_720 + 2048,
258
257
  },
259
258
  {
259
+ contextWindowTokens: 30_720 + 2048,
260
260
  description: 'Gemini 1.0 Pro 002 (Tuning) 提供出色的多模态支持,专注于复杂任务的有效解决。',
261
261
  displayName: 'Gemini 1.0 Pro 002 (Tuning)',
262
262
  id: 'gemini-1.0-pro-002',
@@ -266,7 +266,6 @@ const Google: ModelProviderCard = {
266
266
  output: 1.5,
267
267
  },
268
268
  releasedAt: '2023-12-06',
269
- tokens: 30_720 + 2048,
270
269
  },
271
270
  ],
272
271
  checkModel: 'gemini-1.5-flash-latest',
@@ -5,6 +5,7 @@ const Groq: ModelProviderCard = {
5
5
  chatModels: [
6
6
  // TODO: During preview launch, Groq is limiting 3.2 models to max_tokens of 8k.
7
7
  {
8
+ contextWindowTokens: 131_072,
8
9
  description:
9
10
  'Meta Llama 3.3 多语言大语言模型 ( LLM ) 是 70B(文本输入/文本输出)中的预训练和指令调整生成模型。 Llama 3.3 指令调整的纯文本模型针对多语言对话用例进行了优化,并且在常见行业基准上优于许多可用的开源和封闭式聊天模型。',
10
11
  displayName: 'Llama 3.3 70B',
@@ -16,9 +17,9 @@ const Groq: ModelProviderCard = {
16
17
  input: 0.05,
17
18
  output: 0.08,
18
19
  },
19
- tokens: 131_072,
20
20
  },
21
21
  {
22
+ contextWindowTokens: 8192,
22
23
  description:
23
24
  'Llama 3.2 旨在处理结合视觉和文本数据的任务。它在图像描述和视觉问答等任务中表现出色,跨越了语言生成和视觉推理之间的鸿沟。',
24
25
  displayName: 'Llama 3.2 11B Vision (Preview)',
@@ -29,10 +30,10 @@ const Groq: ModelProviderCard = {
29
30
  input: 0.05,
30
31
  output: 0.08,
31
32
  },
32
- tokens: 8192,
33
33
  vision: true,
34
34
  },
35
35
  {
36
+ contextWindowTokens: 8192,
36
37
  description:
37
38
  'Llama 3.2 旨在处理结合视觉和文本数据的任务。它在图像描述和视觉问答等任务中表现出色,跨越了语言生成和视觉推理之间的鸿沟。',
38
39
  displayName: 'Llama 3.2 90B Vision (Preview)',
@@ -43,10 +44,10 @@ const Groq: ModelProviderCard = {
43
44
  input: 0.59,
44
45
  output: 0.79,
45
46
  },
46
- tokens: 8192,
47
47
  vision: true,
48
48
  },
49
49
  {
50
+ contextWindowTokens: 131_072,
50
51
  description:
51
52
  'Llama 3.1 8B 是一款高效能模型,提供了快速的文本生成能力,非常适合需要大规模效率和成本效益的应用场景。',
52
53
  displayName: 'Llama 3.1 8B',
@@ -58,9 +59,9 @@ const Groq: ModelProviderCard = {
58
59
  input: 0.05,
59
60
  output: 0.08,
60
61
  },
61
- tokens: 131_072,
62
62
  },
63
63
  {
64
+ contextWindowTokens: 131_072,
64
65
  description:
65
66
  'Llama 3.1 70B 提供更强大的AI推理能力,适合复杂应用,支持超多的计算处理并保证高效和准确率。',
66
67
  displayName: 'Llama 3.1 70B',
@@ -72,7 +73,6 @@ const Groq: ModelProviderCard = {
72
73
  input: 0.59,
73
74
  output: 0.79,
74
75
  },
75
- tokens: 131_072,
76
76
  },
77
77
  /*
78
78
  // Offline due to overwhelming demand! Stay tuned for updates.
@@ -84,6 +84,7 @@ const Groq: ModelProviderCard = {
84
84
  },
85
85
  */
86
86
  {
87
+ contextWindowTokens: 8192,
87
88
  description: 'Llama 3 Groq 8B Tool Use 是针对高效工具使用优化的模型,支持快速并行计算。',
88
89
  displayName: 'Llama 3 Groq 8B Tool Use (Preview)',
89
90
  functionCall: true,
@@ -92,9 +93,9 @@ const Groq: ModelProviderCard = {
92
93
  input: 0.19,
93
94
  output: 0.19,
94
95
  },
95
- tokens: 8192,
96
96
  },
97
97
  {
98
+ contextWindowTokens: 8192,
98
99
  description: 'Llama 3 Groq 70B Tool Use 提供强大的工具调用能力,支持复杂任务的高效处理。',
99
100
  displayName: 'Llama 3 Groq 70B Tool Use (Preview)',
100
101
  functionCall: true,
@@ -103,9 +104,9 @@ const Groq: ModelProviderCard = {
103
104
  input: 0.89,
104
105
  output: 0.89,
105
106
  },
106
- tokens: 8192,
107
107
  },
108
108
  {
109
+ contextWindowTokens: 8192,
109
110
  description: 'Meta Llama 3 8B 带来优质的推理效能,适合多场景应用需求。',
110
111
  displayName: 'Meta Llama 3 8B',
111
112
  functionCall: true,
@@ -114,9 +115,9 @@ const Groq: ModelProviderCard = {
114
115
  input: 0.05,
115
116
  output: 0.08,
116
117
  },
117
- tokens: 8192,
118
118
  },
119
119
  {
120
+ contextWindowTokens: 8192,
120
121
  description: 'Meta Llama 3 70B 提供无与伦比的复杂性处理能力,为高要求项目量身定制。',
121
122
  displayName: 'Meta Llama 3 70B',
122
123
  functionCall: true,
@@ -125,9 +126,9 @@ const Groq: ModelProviderCard = {
125
126
  input: 0.59,
126
127
  output: 0.79,
127
128
  },
128
- tokens: 8192,
129
129
  },
130
130
  {
131
+ contextWindowTokens: 8192,
131
132
  description: 'Gemma 2 9B 是一款优化用于特定任务和工具整合的模型。',
132
133
  displayName: 'Gemma 2 9B',
133
134
  enabled: true,
@@ -137,9 +138,9 @@ const Groq: ModelProviderCard = {
137
138
  input: 0.2,
138
139
  output: 0.2,
139
140
  },
140
- tokens: 8192,
141
141
  },
142
142
  {
143
+ contextWindowTokens: 8192,
143
144
  description: 'Gemma 7B 适合中小规模任务处理,兼具成本效益。',
144
145
  displayName: 'Gemma 7B',
145
146
  functionCall: true,
@@ -148,9 +149,9 @@ const Groq: ModelProviderCard = {
148
149
  input: 0.07,
149
150
  output: 0.07,
150
151
  },
151
- tokens: 8192,
152
152
  },
153
153
  {
154
+ contextWindowTokens: 32_768,
154
155
  description: 'Mixtral 8x7B 提供高容错的并行计算能力,适合复杂任务。',
155
156
  displayName: 'Mixtral 8x7B',
156
157
  functionCall: true,
@@ -159,13 +160,12 @@ const Groq: ModelProviderCard = {
159
160
  input: 0.24,
160
161
  output: 0.24,
161
162
  },
162
- tokens: 32_768,
163
163
  },
164
164
  {
165
+ contextWindowTokens: 4096,
165
166
  description: 'LLaVA 1.5 7B 提供视觉处理能力融合,通过视觉信息输入生成复杂输出。',
166
167
  displayName: 'LLaVA 1.5 7B',
167
168
  id: 'llava-v1.5-7b-4096-preview',
168
- tokens: 4096,
169
169
  vision: true,
170
170
  },
171
171
  ],