-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
/
Copy pathqwen.ts
288 lines (286 loc) · 7.8 KB
/
qwen.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
import { ModelProviderCard } from '@/types/llm';
// ref: https://help.aliyun.com/zh/model-studio/getting-started/models
const Qwen: ModelProviderCard = {
chatModels: [
{
contextWindowTokens: 131_072,
description: '通义千问超大规模语言模型,支持中文、英文等不同语言输入。',
displayName: 'Qwen Turbo',
enabled: true,
functionCall: true,
id: 'qwen-turbo-latest',
pricing: {
currency: 'CNY',
input: 0.3,
output: 0.6,
},
},
{
contextWindowTokens: 131_072,
description: '通义千问超大规模语言模型增强版,支持中文、英文等不同语言输入。',
displayName: 'Qwen Plus',
enabled: true,
functionCall: true,
id: 'qwen-plus-latest',
pricing: {
currency: 'CNY',
input: 0.8,
output: 2,
},
},
{
contextWindowTokens: 32_768,
description:
'通义千问千亿级别超大规模语言模型,支持中文、英文等不同语言输入,当前通义千问2.5产品版本背后的API模型。',
displayName: 'Qwen Max',
enabled: true,
functionCall: true,
id: 'qwen-max-latest',
pricing: {
currency: 'CNY',
input: 20,
output: 60,
},
},
{
contextWindowTokens: 1_000_000,
description:
'通义千问超大规模语言模型,支持长文本上下文,以及基于长文档、多文档等多个场景的对话功能。',
displayName: 'Qwen Long',
id: 'qwen-long',
pricing: {
currency: 'CNY',
input: 0.5,
output: 2,
},
},
{
contextWindowTokens: 32_000,
description:
'通义千问大规模视觉语言模型增强版。大幅提升细节识别能力和文字识别能力,支持超百万像素分辨率和任意长宽比规格的图像。',
displayName: 'Qwen VL Plus',
enabled: true,
id: 'qwen-vl-plus-latest',
pricing: {
currency: 'CNY',
input: 8,
output: 8,
},
vision: true,
},
{
contextWindowTokens: 32_000,
description:
'通义千问超大规模视觉语言模型。相比增强版,再次提升视觉推理能力和指令遵循能力,提供更高的视觉感知和认知水平。',
displayName: 'Qwen VL Max',
enabled: true,
id: 'qwen-vl-max-latest',
pricing: {
currency: 'CNY',
input: 20,
output: 20,
},
vision: true,
},
{
contextWindowTokens: 4096,
description: '通义千问数学模型是专门用于数学解题的语言模型。',
displayName: 'Qwen Math Turbo',
id: 'qwen-math-turbo-latest',
pricing: {
currency: 'CNY',
input: 2,
output: 6,
},
},
{
contextWindowTokens: 4096,
description: '通义千问数学模型是专门用于数学解题的语言模型。',
displayName: 'Qwen Math Plus',
id: 'qwen-math-plus-latest',
pricing: {
currency: 'CNY',
input: 4,
output: 12,
},
},
{
contextWindowTokens: 131_072,
description: '通义千问代码模型。',
displayName: 'Qwen Coder Turbo',
id: 'qwen-coder-turbo-latest',
pricing: {
currency: 'CNY',
input: 2,
output: 6,
},
},
{
contextWindowTokens: 131_072,
description: '通义千问代码模型。',
displayName: 'Qwen Coder Plus',
id: 'qwen-coder-plus-latest',
pricing: {
currency: 'CNY',
input: 3.5,
output: 7,
},
},
{
contextWindowTokens: 32_768,
description: 'QwQ模型是由 Qwen 团队开发的实验性研究模型,专注于增强 AI 推理能力。',
displayName: 'QwQ 32B Preview',
id: 'qwq-32b-preview',
pricing: {
currency: 'CNY',
input: 0,
output: 0,
},
},
{
contextWindowTokens: 131_072,
description: '通义千问2.5对外开源的7B规模的模型。',
displayName: 'Qwen2.5 7B',
functionCall: true,
id: 'qwen2.5-7b-instruct',
pricing: {
currency: 'CNY',
input: 1,
output: 2,
},
},
{
contextWindowTokens: 131_072,
description: '通义千问2.5对外开源的14B规模的模型。',
displayName: 'Qwen2.5 14B',
functionCall: true,
id: 'qwen2.5-14b-instruct',
pricing: {
currency: 'CNY',
input: 2,
output: 6,
},
},
{
contextWindowTokens: 131_072,
description: '通义千问2.5对外开源的32B规模的模型。',
displayName: 'Qwen2.5 32B',
functionCall: true,
id: 'qwen2.5-32b-instruct',
pricing: {
currency: 'CNY',
input: 3.5,
output: 7,
},
},
{
contextWindowTokens: 131_072,
description: '通义千问2.5对外开源的72B规模的模型。',
displayName: 'Qwen2.5 72B',
functionCall: true,
id: 'qwen2.5-72b-instruct',
pricing: {
currency: 'CNY',
input: 4,
output: 12,
},
},
{
contextWindowTokens: 4096,
description: 'Qwen-Math 模型具有强大的数学解题能力。',
displayName: 'Qwen2.5 Math 7B',
id: 'qwen2.5-math-7b-instruct',
pricing: {
currency: 'CNY',
input: 1,
output: 2,
},
},
{
contextWindowTokens: 4096,
description: 'Qwen-Math 模型具有强大的数学解题能力。',
displayName: 'Qwen2.5 Math 72B',
id: 'qwen2.5-math-72b-instruct',
pricing: {
currency: 'CNY',
input: 4,
output: 12,
},
},
{
contextWindowTokens: 131_072,
description: '通义千问代码模型开源版。',
displayName: 'Qwen2.5 Coder 7B',
id: 'qwen2.5-coder-7b-instruct',
pricing: {
currency: 'CNY',
input: 1,
output: 2,
},
},
{
contextWindowTokens: 131_072,
description: '通义千问代码模型开源版。',
displayName: 'Qwen2.5 Coder 32B',
id: 'qwen2.5-coder-32b-instruct',
pricing: {
currency: 'CNY',
input: 3.5,
output: 7,
},
},
{
contextWindowTokens: 8000,
description: '以 Qwen-7B 语言模型初始化,添加图像模型,图像输入分辨率为448的预训练模型。',
displayName: 'Qwen VL',
id: 'qwen-vl-v1',
pricing: {
currency: 'CNY',
input: 0,
output: 0,
},
vision: true,
},
{
contextWindowTokens: 8000,
description: '通义千问VL支持灵活的交互方式,包括多图、多轮问答、创作等能力的模型。',
displayName: 'Qwen VL Chat',
id: 'qwen-vl-chat-v1',
pricing: {
currency: 'CNY',
input: 0,
output: 0,
},
vision: true,
},
],
checkModel: 'qwen-turbo-latest',
description:
'通义千问是阿里云自主研发的超大规模语言模型,具有强大的自然语言理解和生成能力。它可以回答各种问题、创作文字内容、表达观点看法、撰写代码等,在多个领域发挥作用。',
disableBrowserRequest: true,
id: 'qwen',
modelList: { showModelFetcher: true },
modelsUrl: 'https://help.aliyun.com/zh/dashscope/developer-reference/api-details',
name: 'Qwen',
proxyUrl: {
placeholder: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
},
settings: {
disableBrowserRequest: true,
proxyUrl: {
placeholder: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
},
sdkType: 'openai',
showModelFetcher: true,
smoothing: {
speed: 2,
text: true,
},
},
smoothing: {
speed: 2,
text: true,
},
url: 'https://www.aliyun.com/product/bailian',
};
export default Qwen;