@lobehub/chat 1.40.1 → 1.40.3

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 (118) 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)/changelog/page.tsx +3 -1
  5. package/src/app/(main)/chat/(workspace)/features/ChangelogModal.tsx +11 -0
  6. package/src/app/(main)/chat/(workspace)/page.tsx +8 -5
  7. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/Actions.tsx +1 -1
  8. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/Header.tsx +1 -1
  9. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/InfoSidebar/SuggestionItem.tsx +2 -2
  10. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/ProviderList/ProviderItem.tsx +1 -1
  11. package/src/app/(main)/discover/(detail)/provider/[slug]/features/ModelList/ModelItem.tsx +3 -3
  12. package/src/app/(main)/discover/(list)/models/features/Card.tsx +6 -2
  13. package/src/app/(main)/settings/llm/ProviderList/Cloudflare/index.tsx +1 -5
  14. package/src/app/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx +2 -2
  15. package/src/app/@modal/(.)changelog/modal/page.tsx +3 -1
  16. package/src/components/Loading/BrandTextLoading/index.tsx +5 -0
  17. package/src/components/ModelSelect/index.tsx +7 -4
  18. package/src/config/__tests__/app.test.ts +6 -2
  19. package/src/config/app.ts +1 -2
  20. package/src/config/featureFlags/schema.ts +3 -0
  21. package/src/config/modelProviders/ai21.ts +2 -2
  22. package/src/config/modelProviders/ai360.ts +4 -4
  23. package/src/config/modelProviders/anthropic.ts +8 -8
  24. package/src/config/modelProviders/azure.ts +5 -5
  25. package/src/config/modelProviders/baichuan.ts +6 -6
  26. package/src/config/modelProviders/bedrock.ts +14 -14
  27. package/src/config/modelProviders/cloudflare.ts +12 -11
  28. package/src/config/modelProviders/deepseek.ts +1 -1
  29. package/src/config/modelProviders/fireworksai.ts +29 -27
  30. package/src/config/modelProviders/giteeai.ts +7 -7
  31. package/src/config/modelProviders/github.ts +29 -28
  32. package/src/config/modelProviders/google.ts +18 -19
  33. package/src/config/modelProviders/groq.ts +13 -13
  34. package/src/config/modelProviders/higress.ts +195 -194
  35. package/src/config/modelProviders/huggingface.ts +7 -7
  36. package/src/config/modelProviders/hunyuan.ts +25 -17
  37. package/src/config/modelProviders/internlm.ts +6 -4
  38. package/src/config/modelProviders/minimax.ts +5 -5
  39. package/src/config/modelProviders/mistral.ts +14 -16
  40. package/src/config/modelProviders/moonshot.ts +3 -3
  41. package/src/config/modelProviders/novita.ts +15 -15
  42. package/src/config/modelProviders/ollama.ts +46 -46
  43. package/src/config/modelProviders/openai.ts +23 -22
  44. package/src/config/modelProviders/openrouter.ts +20 -18
  45. package/src/config/modelProviders/perplexity.ts +7 -7
  46. package/src/config/modelProviders/qwen.ts +23 -25
  47. package/src/config/modelProviders/sensenova.ts +8 -8
  48. package/src/config/modelProviders/siliconcloud.ts +138 -92
  49. package/src/config/modelProviders/spark.ts +6 -6
  50. package/src/config/modelProviders/stepfun.ts +9 -9
  51. package/src/config/modelProviders/taichu.ts +2 -3
  52. package/src/config/modelProviders/togetherai.ts +57 -48
  53. package/src/config/modelProviders/upstage.ts +3 -3
  54. package/src/config/modelProviders/wenxin.ts +12 -12
  55. package/src/config/modelProviders/xai.ts +4 -4
  56. package/src/config/modelProviders/zeroone.ts +11 -11
  57. package/src/config/modelProviders/zhipu.ts +17 -16
  58. package/src/database/_deprecated/core/model.ts +1 -1
  59. package/src/database/_deprecated/models/sessionGroup.ts +4 -1
  60. package/src/database/client/migrations.json +2 -5
  61. package/src/database/migrations/meta/0012_snapshot.json +176 -518
  62. package/src/database/schemas/agent.ts +1 -1
  63. package/src/database/schemas/message.ts +1 -0
  64. package/src/database/schemas/session.ts +1 -0
  65. package/src/database/server/models/topic.ts +19 -17
  66. package/src/features/ChangelogModal/index.tsx +8 -2
  67. package/src/features/DebugUI/Content.tsx +0 -1
  68. package/src/features/PluginStore/index.tsx +2 -2
  69. package/src/features/User/UserPanel/useMenu.tsx +1 -1
  70. package/src/layout/GlobalProvider/AntdV5MonkeyPatch.tsx +4 -4
  71. package/src/libs/agent-runtime/google/index.ts +4 -3
  72. package/src/libs/agent-runtime/higress/index.ts +1 -1
  73. package/src/libs/agent-runtime/huggingface/index.ts +2 -4
  74. package/src/libs/agent-runtime/minimax/index.ts +5 -10
  75. package/src/libs/agent-runtime/mistral/index.ts +3 -6
  76. package/src/libs/agent-runtime/moonshot/index.ts +3 -6
  77. package/src/libs/agent-runtime/novita/__snapshots__/index.test.ts.snap +18 -18
  78. package/src/libs/agent-runtime/novita/index.ts +1 -1
  79. package/src/libs/agent-runtime/openai/__snapshots__/index.test.ts.snap +10 -10
  80. package/src/libs/agent-runtime/openrouter/__snapshots__/index.test.ts.snap +168 -168
  81. package/src/libs/agent-runtime/openrouter/index.ts +1 -1
  82. package/src/libs/agent-runtime/perplexity/index.ts +4 -4
  83. package/src/libs/agent-runtime/sensenova/index.ts +9 -3
  84. package/src/libs/agent-runtime/taichu/index.ts +4 -10
  85. package/src/libs/agent-runtime/utils/streams/minimax.test.ts +5 -2
  86. package/src/libs/agent-runtime/utils/streams/minimax.ts +4 -1
  87. package/src/libs/agent-runtime/zhipu/index.ts +12 -13
  88. package/src/libs/langchain/loaders/index.ts +2 -2
  89. package/src/libs/langchain/types.ts +9 -1
  90. package/src/locales/default/modelProvider.ts +1 -1
  91. package/src/migrations/FromV3ToV4/fixtures/ollama-output-v4.json +1 -1
  92. package/src/migrations/FromV6ToV7/types/v7.ts +0 -2
  93. package/src/server/globalConfig/genServerLLMConfig.test.ts +4 -4
  94. package/src/server/globalConfig/genServerLLMConfig.ts +29 -24
  95. package/src/server/globalConfig/index.ts +1 -2
  96. package/src/server/routers/edge/config/__snapshots__/index.test.ts.snap +9 -9
  97. package/src/server/routers/lambda/_template.ts +1 -1
  98. package/src/server/routers/lambda/knowledgeBase.ts +1 -1
  99. package/src/server/routers/lambda/session.ts +1 -1
  100. package/src/server/routers/lambda/sessionGroup.ts +1 -1
  101. package/src/server/routers/lambda/thread.ts +1 -1
  102. package/src/server/services/changelog/index.test.ts +4 -2
  103. package/src/server/services/changelog/index.ts +10 -2
  104. package/src/server/services/nextAuthUser/index.ts +1 -1
  105. package/src/store/serverConfig/selectors.test.ts +1 -0
  106. package/src/store/user/slices/modelList/__snapshots__/action.test.ts.snap +1 -1
  107. package/src/store/user/slices/modelList/action.test.ts +4 -4
  108. package/src/store/user/slices/modelList/reducers/customModelCard.test.ts +6 -6
  109. package/src/store/user/slices/modelList/selectors/modelProvider.ts +3 -2
  110. package/src/tools/dalle/Render/Item/index.tsx +1 -1
  111. package/src/types/files/index.ts +0 -1
  112. package/src/types/llm.ts +4 -5
  113. package/src/utils/__snapshots__/parseModels.test.ts.snap +2 -2
  114. package/src/utils/genUserLLMConfig.test.ts +4 -4
  115. package/src/utils/genUserLLMConfig.ts +6 -4
  116. package/src/utils/parseModels.test.ts +16 -16
  117. package/src/utils/parseModels.ts +1 -1
  118. package/src/utils/server/jwt.ts +2 -6
@@ -4,16 +4,17 @@ import { ModelProviderCard } from '@/types/llm';
4
4
  const OpenRouter: ModelProviderCard = {
5
5
  chatModels: [
6
6
  {
7
+ contextWindowTokens: 128_000,
7
8
  description:
8
9
  '根据上下文长度、主题和复杂性,你的请求将发送到 Llama 3 70B Instruct、Claude 3.5 Sonnet(自我调节)或 GPT-4o。',
9
10
  displayName: 'Auto (best for prompt)',
10
11
  enabled: true,
11
12
  functionCall: false,
12
13
  id: 'openrouter/auto',
13
- tokens: 128_000,
14
14
  vision: false,
15
15
  },
16
16
  {
17
+ contextWindowTokens: 128_000,
17
18
  description:
18
19
  'o1-mini是一款针对编程、数学和科学应用场景而设计的快速、经济高效的推理模型。该模型具有128K上下文和2023年10月的知识截止日期。',
19
20
  displayName: 'OpenAI o1-mini',
@@ -25,9 +26,9 @@ const OpenRouter: ModelProviderCard = {
25
26
  output: 12,
26
27
  },
27
28
  releasedAt: '2024-09-12',
28
- tokens: 128_000,
29
29
  },
30
30
  {
31
+ contextWindowTokens: 128_000,
31
32
  description:
32
33
  'o1是OpenAI新的推理模型,适用于需要广泛通用知识的复杂任务。该模型具有128K上下文和2023年10月的知识截止日期。',
33
34
  displayName: 'OpenAI o1-preview',
@@ -39,9 +40,9 @@ const OpenRouter: ModelProviderCard = {
39
40
  output: 60,
40
41
  },
41
42
  releasedAt: '2024-09-12',
42
- tokens: 128_000,
43
43
  },
44
44
  {
45
+ contextWindowTokens: 128_000,
45
46
  description:
46
47
  'GPT-4o mini是OpenAI在GPT-4 Omni之后推出的最新模型,支持图文输入并输出文本。作为他们最先进的小型模型,它比其他近期的前沿模型便宜很多,并且比GPT-3.5 Turbo便宜超过60%。它保持了最先进的智能,同时具有显著的性价比。GPT-4o mini在MMLU测试中获得了 82% 的得分,目前在聊天偏好上排名高于 GPT-4。',
47
48
  displayName: 'GPT-4o mini',
@@ -53,10 +54,10 @@ const OpenRouter: ModelProviderCard = {
53
54
  input: 0.15,
54
55
  output: 0.6,
55
56
  },
56
- tokens: 128_000,
57
57
  vision: true,
58
58
  },
59
59
  {
60
+ contextWindowTokens: 128_000,
60
61
  description:
61
62
  'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
62
63
  displayName: 'GPT-4o',
@@ -67,10 +68,10 @@ const OpenRouter: ModelProviderCard = {
67
68
  input: 2.5,
68
69
  output: 10,
69
70
  },
70
- tokens: 128_000,
71
71
  vision: true,
72
72
  },
73
73
  {
74
+ contextWindowTokens: 200_000,
74
75
  description:
75
76
  'Claude 3 Haiku 是 Anthropic 的最快且最紧凑的模型,旨在实现近乎即时的响应。它具有快速且准确的定向性能。',
76
77
  displayName: 'Claude 3 Haiku',
@@ -85,10 +86,10 @@ const OpenRouter: ModelProviderCard = {
85
86
  writeCacheInput: 0.3125,
86
87
  },
87
88
  releasedAt: '2024-03-07',
88
- tokens: 200_000,
89
89
  vision: true,
90
90
  },
91
91
  {
92
+ contextWindowTokens: 200_000,
92
93
  description:
93
94
  'Claude 3.5 Sonnet 提供了超越 Opus 的能力和比 Sonnet 更快的速度,同时保持与 Sonnet 相同的价格。Sonnet 特别擅长编程、数据科学、视觉处理、代理任务。',
94
95
  displayName: 'Claude 3.5 Sonnet',
@@ -103,10 +104,10 @@ const OpenRouter: ModelProviderCard = {
103
104
  writeCacheInput: 3.75,
104
105
  },
105
106
  releasedAt: '2024-06-20',
106
- tokens: 200_000,
107
107
  vision: true,
108
108
  },
109
109
  {
110
+ contextWindowTokens: 200_000,
110
111
  description:
111
112
  'Claude 3 Opus 是 Anthropic 用于处理高度复杂任务的最强大模型。它在性能、智能、流畅性和理解力方面表现卓越。',
112
113
  displayName: 'Claude 3 Opus',
@@ -121,10 +122,10 @@ const OpenRouter: ModelProviderCard = {
121
122
  writeCacheInput: 18.75,
122
123
  },
123
124
  releasedAt: '2024-02-29',
124
- tokens: 200_000,
125
125
  vision: true,
126
126
  },
127
127
  {
128
+ contextWindowTokens: 1_000_000 + 8192,
128
129
  description: 'Gemini 1.5 Flash 提供了优化后的多模态处理能力,适用多种复杂任务场景。',
129
130
  displayName: 'Gemini 1.5 Flash',
130
131
  enabled: true,
@@ -135,10 +136,10 @@ const OpenRouter: ModelProviderCard = {
135
136
  input: 0.075,
136
137
  output: 0.3,
137
138
  },
138
- tokens: 1_000_000 + 8192,
139
139
  vision: true,
140
140
  },
141
141
  {
142
+ contextWindowTokens: 2_000_000 + 8192,
142
143
  description: 'Gemini 1.5 Pro 结合最新优化技术,带来更高效的多模态数据处理能力。',
143
144
  displayName: 'Gemini 1.5 Pro',
144
145
  enabled: true,
@@ -149,10 +150,10 @@ const OpenRouter: ModelProviderCard = {
149
150
  input: 3.5,
150
151
  output: 10.5,
151
152
  },
152
- tokens: 2_000_000 + 8192,
153
153
  vision: true,
154
154
  },
155
155
  {
156
+ contextWindowTokens: 128_000,
156
157
  description:
157
158
  '融合通用与代码能力的全新开源模型, 不仅保留了原有 Chat 模型的通用对话能力和 Coder 模型的强大代码处理能力,还更好地对齐了人类偏好。此外,DeepSeek-V2.5 在写作任务、指令跟随等多个方面也实现了大幅提升。',
158
159
  displayName: 'DeepSeek V2.5',
@@ -164,10 +165,11 @@ const OpenRouter: ModelProviderCard = {
164
165
  output: 0.28,
165
166
  },
166
167
  releasedAt: '2024-09-05',
167
- tokens: 128_000,
168
168
  },
169
169
  {
170
- description: 'LLaMA 3.2 旨在处理结合视觉和文本数据的任务。它在图像描述和视觉问答等任务中表现出色,跨越了语言生成和视觉推理之间的鸿沟。',
170
+ contextWindowTokens: 131_072,
171
+ description:
172
+ 'LLaMA 3.2 旨在处理结合视觉和文本数据的任务。它在图像描述和视觉问答等任务中表现出色,跨越了语言生成和视觉推理之间的鸿沟。',
171
173
  displayName: 'Llama 3.2 11B Vision',
172
174
  enabled: true,
173
175
  id: 'meta-llama/llama-3.2-11b-vision-instruct',
@@ -175,11 +177,12 @@ const OpenRouter: ModelProviderCard = {
175
177
  input: 0.162,
176
178
  output: 0.162,
177
179
  },
178
- tokens: 131_072,
179
180
  vision: true,
180
181
  },
181
182
  {
182
- description: 'LLaMA 3.2 旨在处理结合视觉和文本数据的任务。它在图像描述和视觉问答等任务中表现出色,跨越了语言生成和视觉推理之间的鸿沟。',
183
+ contextWindowTokens: 131_072,
184
+ description:
185
+ 'LLaMA 3.2 旨在处理结合视觉和文本数据的任务。它在图像描述和视觉问答等任务中表现出色,跨越了语言生成和视觉推理之间的鸿沟。',
183
186
  displayName: 'Llama 3.2 90B Vision',
184
187
  enabled: true,
185
188
  id: 'meta-llama/llama-3.2-90b-vision-instruct',
@@ -187,29 +190,28 @@ const OpenRouter: ModelProviderCard = {
187
190
  input: 0.4,
188
191
  output: 0.4,
189
192
  },
190
- tokens: 131_072,
191
193
  vision: true,
192
194
  },
193
195
  {
196
+ contextWindowTokens: 32_768,
194
197
  description: 'Qwen2 是全新的大型语言模型系列,具有更强的理解和生成能力。',
195
198
  displayName: 'Qwen2 7B (Free)',
196
199
  enabled: true,
197
200
  id: 'qwen/qwen-2-7b-instruct:free',
198
- tokens: 32_768,
199
201
  },
200
202
  {
203
+ contextWindowTokens: 32_768,
201
204
  description: 'LLaMA 3.1 提供多语言支持,是业界领先的生成模型之一。',
202
205
  displayName: 'Llama 3.1 8B (Free)',
203
206
  enabled: true,
204
207
  id: 'meta-llama/llama-3.1-8b-instruct:free',
205
- tokens: 32_768,
206
208
  },
207
209
  {
210
+ contextWindowTokens: 8192,
208
211
  description: 'Gemma 2 是Google轻量化的开源文本模型系列。',
209
212
  displayName: 'Gemma 2 9B (Free)',
210
213
  enabled: true,
211
214
  id: 'google/gemma-2-9b-it:free',
212
- tokens: 8192,
213
215
  },
214
216
  ],
215
217
  checkModel: 'google/gemma-2-9b-it:free',
@@ -4,56 +4,56 @@ import { ModelProviderCard } from '@/types/llm';
4
4
  const Perplexity: ModelProviderCard = {
5
5
  chatModels: [
6
6
  {
7
+ contextWindowTokens: 128_000,
7
8
  description:
8
9
  'Llama 3.1 Sonar Small Online 模型,具备8B参数,支持约127,000个标记的上下文长度,专为在线聊天设计,能高效处理各种文本交互。',
9
10
  displayName: 'Llama 3.1 Sonar Small Online',
10
11
  enabled: true,
11
12
  id: 'llama-3.1-sonar-small-128k-online',
12
- tokens: 128_000,
13
13
  },
14
14
  {
15
+ contextWindowTokens: 128_000,
15
16
  description:
16
17
  'Llama 3.1 Sonar Large Online 模型,具备70B参数,支持约127,000个标记的上下文长度,适用于高容量和多样化聊天任务。',
17
18
  displayName: 'Llama 3.1 Sonar Large Online',
18
19
  enabled: true,
19
20
  id: 'llama-3.1-sonar-large-128k-online',
20
- tokens: 128_000,
21
21
  },
22
22
  {
23
+ contextWindowTokens: 128_000,
23
24
  description:
24
25
  'Llama 3.1 Sonar Huge Online 模型,具备405B参数,支持约127,000个标记的上下文长度,设计用于复杂的在线聊天应用。',
25
26
  displayName: 'Llama 3.1 Sonar Huge Online',
26
27
  enabled: true,
27
28
  id: 'llama-3.1-sonar-huge-128k-online',
28
- tokens: 128_000,
29
29
  },
30
30
  {
31
+ contextWindowTokens: 128_000,
31
32
  description:
32
33
  'Llama 3.1 Sonar Small Chat 模型,具备8B参数,专为离线聊天设计,支持约127,000个标记的上下文长度。',
33
34
  displayName: 'Llama 3.1 Sonar Small Chat',
34
35
  enabled: true,
35
36
  id: 'llama-3.1-sonar-small-128k-chat',
36
- tokens: 128_000,
37
37
  },
38
38
  {
39
+ contextWindowTokens: 128_000,
39
40
  description:
40
41
  'Llama 3.1 Sonar Large Chat 模型,具备70B参数,支持约127,000个标记的上下文长度,适合于复杂的离线聊天任务。',
41
42
  displayName: 'Llama 3.1 Sonar Large Chat',
42
43
  enabled: true,
43
44
  id: 'llama-3.1-sonar-large-128k-chat',
44
- tokens: 128_000,
45
45
  },
46
46
  {
47
+ contextWindowTokens: 128_000,
47
48
  description:
48
49
  'Llama 3.1 8B Instruct 模型,具备8B参数,支持画面指示任务的高效执行,提供优质的文本生成能力。',
49
50
  id: 'llama-3.1-8b-instruct',
50
- tokens: 128_000,
51
51
  },
52
52
  {
53
+ contextWindowTokens: 128_000,
53
54
  description:
54
55
  'Llama 3.1 70B Instruct 模型,具备70B参数,能在大型文本生成和指示任务中提供卓越性能。',
55
56
  id: 'llama-3.1-70b-instruct',
56
- tokens: 128_000,
57
57
  },
58
58
  ],
59
59
  checkModel: 'llama-3.1-8b-instruct',
@@ -4,6 +4,7 @@ import { ModelProviderCard } from '@/types/llm';
4
4
  const Qwen: ModelProviderCard = {
5
5
  chatModels: [
6
6
  {
7
+ contextWindowTokens: 131_072,
7
8
  description: '通义千问超大规模语言模型,支持中文、英文等不同语言输入。',
8
9
  displayName: 'Qwen Turbo',
9
10
  enabled: true,
@@ -14,9 +15,9 @@ const Qwen: ModelProviderCard = {
14
15
  input: 0.3,
15
16
  output: 0.6,
16
17
  },
17
- tokens: 131_072,
18
18
  },
19
19
  {
20
+ contextWindowTokens: 131_072,
20
21
  description: '通义千问超大规模语言模型增强版,支持中文、英文等不同语言输入。',
21
22
  displayName: 'Qwen Plus',
22
23
  enabled: true,
@@ -27,9 +28,9 @@ const Qwen: ModelProviderCard = {
27
28
  input: 0.8,
28
29
  output: 2,
29
30
  },
30
- tokens: 131_072,
31
31
  },
32
32
  {
33
+ contextWindowTokens: 32_768,
33
34
  description:
34
35
  '通义千问千亿级别超大规模语言模型,支持中文、英文等不同语言输入,当前通义千问2.5产品版本背后的API模型。',
35
36
  displayName: 'Qwen Max',
@@ -41,9 +42,9 @@ const Qwen: ModelProviderCard = {
41
42
  input: 20,
42
43
  output: 60,
43
44
  },
44
- tokens: 32_768,
45
45
  },
46
46
  {
47
+ contextWindowTokens: 1_000_000,
47
48
  description:
48
49
  '通义千问超大规模语言模型,支持长文本上下文,以及基于长文档、多文档等多个场景的对话功能。',
49
50
  displayName: 'Qwen Long',
@@ -53,9 +54,9 @@ const Qwen: ModelProviderCard = {
53
54
  input: 0.5,
54
55
  output: 2,
55
56
  },
56
- tokens: 1_000_000,
57
57
  },
58
58
  {
59
+ contextWindowTokens: 32_000,
59
60
  description:
60
61
  '通义千问大规模视觉语言模型增强版。大幅提升细节识别能力和文字识别能力,支持超百万像素分辨率和任意长宽比规格的图像。',
61
62
  displayName: 'Qwen VL Plus',
@@ -66,10 +67,10 @@ const Qwen: ModelProviderCard = {
66
67
  input: 8,
67
68
  output: 8,
68
69
  },
69
- tokens: 32_000,
70
70
  vision: true,
71
71
  },
72
72
  {
73
+ contextWindowTokens: 32_000,
73
74
  description:
74
75
  '通义千问超大规模视觉语言模型。相比增强版,再次提升视觉推理能力和指令遵循能力,提供更高的视觉感知和认知水平。',
75
76
  displayName: 'Qwen VL Max',
@@ -80,12 +81,11 @@ const Qwen: ModelProviderCard = {
80
81
  input: 20,
81
82
  output: 20,
82
83
  },
83
- tokens: 32_000,
84
84
  vision: true,
85
85
  },
86
86
  {
87
- description:
88
- '通义千问数学模型是专门用于数学解题的语言模型。',
87
+ contextWindowTokens: 4096,
88
+ description: '通义千问数学模型是专门用于数学解题的语言模型。',
89
89
  displayName: 'Qwen Math Turbo',
90
90
  id: 'qwen-math-turbo-latest',
91
91
  pricing: {
@@ -93,11 +93,10 @@ const Qwen: ModelProviderCard = {
93
93
  input: 2,
94
94
  output: 6,
95
95
  },
96
- tokens: 4096,
97
96
  },
98
97
  {
99
- description:
100
- '通义千问数学模型是专门用于数学解题的语言模型。',
98
+ contextWindowTokens: 4096,
99
+ description: '通义千问数学模型是专门用于数学解题的语言模型。',
101
100
  displayName: 'Qwen Math Plus',
102
101
  id: 'qwen-math-plus-latest',
103
102
  pricing: {
@@ -105,9 +104,9 @@ const Qwen: ModelProviderCard = {
105
104
  input: 4,
106
105
  output: 12,
107
106
  },
108
- tokens: 4096,
109
107
  },
110
108
  {
109
+ contextWindowTokens: 131_072,
111
110
  description: '通义千问代码模型。',
112
111
  displayName: 'Qwen Coder Turbo',
113
112
  id: 'qwen-coder-turbo-latest',
@@ -116,9 +115,9 @@ const Qwen: ModelProviderCard = {
116
115
  input: 2,
117
116
  output: 6,
118
117
  },
119
- tokens: 131_072,
120
118
  },
121
119
  {
120
+ contextWindowTokens: 131_072,
122
121
  description: '通义千问代码模型。',
123
122
  displayName: 'Qwen Coder Plus',
124
123
  id: 'qwen-coder-plus-latest',
@@ -127,9 +126,9 @@ const Qwen: ModelProviderCard = {
127
126
  input: 3.5,
128
127
  output: 7,
129
128
  },
130
- tokens: 131_072,
131
129
  },
132
130
  {
131
+ contextWindowTokens: 32_768,
133
132
  description: 'QwQ模型是由 Qwen 团队开发的实验性研究模型,专注于增强 AI 推理能力。',
134
133
  displayName: 'QwQ 32B Preview',
135
134
  id: 'qwq-32b-preview',
@@ -138,9 +137,9 @@ const Qwen: ModelProviderCard = {
138
137
  input: 0,
139
138
  output: 0,
140
139
  },
141
- tokens: 32_768,
142
140
  },
143
141
  {
142
+ contextWindowTokens: 131_072,
144
143
  description: '通义千问2.5对外开源的7B规模的模型。',
145
144
  displayName: 'Qwen2.5 7B',
146
145
  functionCall: true,
@@ -150,9 +149,9 @@ const Qwen: ModelProviderCard = {
150
149
  input: 1,
151
150
  output: 2,
152
151
  },
153
- tokens: 131_072,
154
152
  },
155
153
  {
154
+ contextWindowTokens: 131_072,
156
155
  description: '通义千问2.5对外开源的14B规模的模型。',
157
156
  displayName: 'Qwen2.5 14B',
158
157
  functionCall: true,
@@ -162,9 +161,9 @@ const Qwen: ModelProviderCard = {
162
161
  input: 2,
163
162
  output: 6,
164
163
  },
165
- tokens: 131_072,
166
164
  },
167
165
  {
166
+ contextWindowTokens: 131_072,
168
167
  description: '通义千问2.5对外开源的32B规模的模型。',
169
168
  displayName: 'Qwen2.5 32B',
170
169
  functionCall: true,
@@ -174,9 +173,9 @@ const Qwen: ModelProviderCard = {
174
173
  input: 3.5,
175
174
  output: 7,
176
175
  },
177
- tokens: 131_072,
178
176
  },
179
177
  {
178
+ contextWindowTokens: 131_072,
180
179
  description: '通义千问2.5对外开源的72B规模的模型。',
181
180
  displayName: 'Qwen2.5 72B',
182
181
  functionCall: true,
@@ -186,9 +185,9 @@ const Qwen: ModelProviderCard = {
186
185
  input: 4,
187
186
  output: 12,
188
187
  },
189
- tokens: 131_072,
190
188
  },
191
189
  {
190
+ contextWindowTokens: 4096,
192
191
  description: 'Qwen-Math 模型具有强大的数学解题能力。',
193
192
  displayName: 'Qwen2.5 Math 7B',
194
193
  id: 'qwen2.5-math-7b-instruct',
@@ -197,9 +196,9 @@ const Qwen: ModelProviderCard = {
197
196
  input: 1,
198
197
  output: 2,
199
198
  },
200
- tokens: 4096,
201
199
  },
202
200
  {
201
+ contextWindowTokens: 4096,
203
202
  description: 'Qwen-Math 模型具有强大的数学解题能力。',
204
203
  displayName: 'Qwen2.5 Math 72B',
205
204
  id: 'qwen2.5-math-72b-instruct',
@@ -208,9 +207,9 @@ const Qwen: ModelProviderCard = {
208
207
  input: 4,
209
208
  output: 12,
210
209
  },
211
- tokens: 4096,
212
210
  },
213
211
  {
212
+ contextWindowTokens: 131_072,
214
213
  description: '通义千问代码模型开源版。',
215
214
  displayName: 'Qwen2.5 Coder 7B',
216
215
  id: 'qwen2.5-coder-7b-instruct',
@@ -219,9 +218,9 @@ const Qwen: ModelProviderCard = {
219
218
  input: 1,
220
219
  output: 2,
221
220
  },
222
- tokens: 131_072,
223
221
  },
224
222
  {
223
+ contextWindowTokens: 131_072,
225
224
  description: '通义千问代码模型开源版。',
226
225
  displayName: 'Qwen2.5 Coder 32B',
227
226
  id: 'qwen2.5-coder-32b-instruct',
@@ -230,9 +229,9 @@ const Qwen: ModelProviderCard = {
230
229
  input: 3.5,
231
230
  output: 7,
232
231
  },
233
- tokens: 131_072,
234
232
  },
235
233
  {
234
+ contextWindowTokens: 8000,
236
235
  description: '以 Qwen-7B 语言模型初始化,添加图像模型,图像输入分辨率为448的预训练模型。',
237
236
  displayName: 'Qwen VL',
238
237
  id: 'qwen-vl-v1',
@@ -241,10 +240,10 @@ const Qwen: ModelProviderCard = {
241
240
  input: 0,
242
241
  output: 0,
243
242
  },
244
- tokens: 8000,
245
243
  vision: true,
246
244
  },
247
245
  {
246
+ contextWindowTokens: 8000,
248
247
  description: '通义千问VL支持灵活的交互方式,包括多图、多轮问答、创作等能力的模型。',
249
248
  displayName: 'Qwen VL Chat',
250
249
  id: 'qwen-vl-chat-v1',
@@ -253,7 +252,6 @@ const Qwen: ModelProviderCard = {
253
252
  input: 0,
254
253
  output: 0,
255
254
  },
256
- tokens: 8000,
257
255
  vision: true,
258
256
  },
259
257
  ],
@@ -5,6 +5,7 @@ import { ModelProviderCard } from '@/types/llm';
5
5
  const SenseNova: ModelProviderCard = {
6
6
  chatModels: [
7
7
  {
8
+ contextWindowTokens: 131_072,
8
9
  description:
9
10
  '最新版本模型 (V5.5),128K上下文长度,在数学推理、英文对话、指令跟随以及长文本理解等领域能力显著提升,比肩GPT-4o',
10
11
  displayName: 'SenseChat 5.5',
@@ -16,7 +17,6 @@ const SenseNova: ModelProviderCard = {
16
17
  input: 40,
17
18
  output: 100,
18
19
  },
19
- tokens: 131_072,
20
20
  },
21
21
  /*
22
22
  // Not compatible with local mode (Not support Base64 Image)
@@ -35,6 +35,7 @@ const SenseNova: ModelProviderCard = {
35
35
  },
36
36
  */
37
37
  {
38
+ contextWindowTokens: 32_768,
38
39
  description: '适用于快速问答、模型微调场景',
39
40
  displayName: 'SenseChat 5.0 Turbo',
40
41
  enabled: true,
@@ -44,9 +45,9 @@ const SenseNova: ModelProviderCard = {
44
45
  input: 2,
45
46
  output: 5,
46
47
  },
47
- tokens: 32_768,
48
48
  },
49
49
  {
50
+ contextWindowTokens: 32_768,
50
51
  description:
51
52
  '32K上下文长度,在粤语的对话理解上超越了GPT-4,在知识、推理、数学及代码编写等多个领域均能与GPT-4 Turbo相媲美',
52
53
  displayName: 'SenseChat 5.0 Cantonese',
@@ -56,9 +57,9 @@ const SenseNova: ModelProviderCard = {
56
57
  input: 27,
57
58
  output: 27,
58
59
  },
59
- tokens: 32_768,
60
60
  },
61
61
  {
62
+ contextWindowTokens: 131_072,
62
63
  description: '基础版本模型 (V4),128K上下文长度,在长文本理解及生成等任务中表现出色',
63
64
  displayName: 'SenseChat 4.0 128K',
64
65
  enabled: true,
@@ -68,9 +69,9 @@ const SenseNova: ModelProviderCard = {
68
69
  input: 60,
69
70
  output: 60,
70
71
  },
71
- tokens: 131_072,
72
72
  },
73
73
  {
74
+ contextWindowTokens: 32_768,
74
75
  description: '基础版本模型 (V4),32K上下文长度,灵活应用于各类场景',
75
76
  displayName: 'SenseChat 4.0 32K',
76
77
  enabled: true,
@@ -80,9 +81,9 @@ const SenseNova: ModelProviderCard = {
80
81
  input: 36,
81
82
  output: 36,
82
83
  },
83
- tokens: 32_768,
84
84
  },
85
85
  {
86
+ contextWindowTokens: 4096,
86
87
  description: '基础版本模型 (V4),4K上下文长度,通用能力强大',
87
88
  displayName: 'SenseChat 4.0 4K',
88
89
  enabled: true,
@@ -92,9 +93,9 @@ const SenseNova: ModelProviderCard = {
92
93
  input: 12,
93
94
  output: 12,
94
95
  },
95
- tokens: 4096,
96
96
  },
97
97
  {
98
+ contextWindowTokens: 8192,
98
99
  description: '标准版模型,8K上下文长度,高响应速度',
99
100
  displayName: 'SenseChat Character',
100
101
  id: 'SenseChat-Character',
@@ -103,9 +104,9 @@ const SenseNova: ModelProviderCard = {
103
104
  input: 12,
104
105
  output: 12,
105
106
  },
106
- tokens: 8192,
107
107
  },
108
108
  {
109
+ contextWindowTokens: 32_768,
109
110
  description: '高级版模型,32K上下文长度,能力全面提升,支持中/英文对话',
110
111
  displayName: 'SenseChat Character Pro',
111
112
  id: 'SenseChat-Character-Pro',
@@ -114,7 +115,6 @@ const SenseNova: ModelProviderCard = {
114
115
  input: 15,
115
116
  output: 15,
116
117
  },
117
- tokens: 32_768,
118
118
  },
119
119
  ],
120
120
  checkModel: 'SenseChat-Turbo',