forked from lobehub/lobe-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenai.ts
308 lines (306 loc) · 10.7 KB
/
openai.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
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
import { ModelProviderCard } from '@/types/llm';
// ref: https://platform.openai.com/docs/deprecations
const OpenAI: ModelProviderCard = {
chatModels: [
{
contextWindowTokens: 128_000,
description:
'o1-mini是一款针对编程、数学和科学应用场景而设计的快速、经济高效的推理模型。该模型具有128K上下文和2023年10月的知识截止日期。',
displayName: 'OpenAI o1-mini',
enabled: true,
id: 'o1-mini',
maxOutput: 65_536,
pricing: {
input: 3,
output: 12,
},
releasedAt: '2024-09-12',
},
{
contextWindowTokens: 200_000,
description:
'o1是OpenAI新的推理模型,支持图文输入并输出文本,适用于需要广泛通用知识的复杂任务。该模型具有200K上下文和2023年10月的知识截止日期。',
displayName: 'OpenAI o1',
enabled: true,
id: 'o1-2024-12-17',
maxOutput: 100_000,
pricing: {
input: 15,
output: 60,
},
releasedAt: '2024-12-17',
vision: true,
},
{
contextWindowTokens: 128_000,
description:
'o1是OpenAI新的推理模型,适用于需要广泛通用知识的复杂任务。该模型具有128K上下文和2023年10月的知识截止日期。',
displayName: 'OpenAI o1-preview',
enabled: true,
id: 'o1-preview',
maxOutput: 32_768,
pricing: {
input: 15,
output: 60,
},
releasedAt: '2024-09-12',
},
{
contextWindowTokens: 128_000,
description:
'GPT-4o mini是OpenAI在GPT-4 Omni之后推出的最新模型,支持图文输入并输出文本。作为他们最先进的小型模型,它比其他近期的前沿模型便宜很多,并且比GPT-3.5 Turbo便宜超过60%。它保持了最先进的智能,同时具有显著的性价比。GPT-4o mini在MMLU测试中获得了 82% 的得分,目前在聊天偏好上排名高于 GPT-4。',
displayName: 'GPT-4o mini',
enabled: true,
functionCall: true,
id: 'gpt-4o-mini',
maxOutput: 16_385,
pricing: {
input: 0.15,
output: 0.6,
},
vision: true,
},
{
contextWindowTokens: 128_000,
description:
'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
displayName: 'GPT-4o 1120',
enabled: true,
functionCall: true,
id: 'gpt-4o-2024-11-20',
pricing: {
input: 2.5,
output: 10,
},
releasedAt: '2024-11-20',
vision: true,
},
{
contextWindowTokens: 128_000,
description:
'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
displayName: 'GPT-4o',
enabled: true,
functionCall: true,
id: 'gpt-4o',
pricing: {
input: 2.5,
output: 10,
},
vision: true,
},
{
contextWindowTokens: 128_000,
description:
'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
displayName: 'GPT-4o 0806',
functionCall: true,
id: 'gpt-4o-2024-08-06',
pricing: {
input: 2.5,
output: 10,
},
releasedAt: '2024-08-06',
vision: true,
},
{
contextWindowTokens: 128_000,
description:
'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
displayName: 'GPT-4o 0513',
functionCall: true,
id: 'gpt-4o-2024-05-13',
pricing: {
input: 5,
output: 15,
},
releasedAt: '2024-05-13',
vision: true,
},
{
contextWindowTokens: 128_000,
description:
'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
displayName: 'ChatGPT-4o',
enabled: true,
id: 'chatgpt-4o-latest',
pricing: {
input: 5,
output: 15,
},
vision: true,
},
{
contextWindowTokens: 128_000,
description:
'最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
displayName: 'GPT-4 Turbo',
functionCall: true,
id: 'gpt-4-turbo',
pricing: {
input: 10,
output: 30,
},
vision: true,
},
{
contextWindowTokens: 128_000,
description:
'最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
displayName: 'GPT-4 Turbo Vision 0409',
functionCall: true,
id: 'gpt-4-turbo-2024-04-09',
pricing: {
input: 10,
output: 30,
},
vision: true,
},
{
contextWindowTokens: 128_000,
description:
'最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
displayName: 'GPT-4 Turbo Preview',
functionCall: true,
id: 'gpt-4-turbo-preview',
pricing: {
input: 10,
output: 30,
},
},
{
contextWindowTokens: 128_000,
description:
'最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
displayName: 'GPT-4 Turbo Preview 0125',
functionCall: true,
id: 'gpt-4-0125-preview',
pricing: {
input: 10,
output: 30,
},
},
{
contextWindowTokens: 128_000,
description:
'最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
displayName: 'GPT-4 Turbo Preview 1106',
functionCall: true,
id: 'gpt-4-1106-preview',
pricing: {
input: 10,
output: 30,
},
},
{
contextWindowTokens: 8192,
description:
'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。',
displayName: 'GPT-4',
functionCall: true,
id: 'gpt-4',
pricing: {
input: 30,
output: 60,
},
},
{
contextWindowTokens: 8192,
description:
'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。',
displayName: 'GPT-4 0613',
functionCall: true,
id: 'gpt-4-0613',
pricing: {
input: 30,
output: 60,
},
},
{
contextWindowTokens: 32_768,
description:
'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。',
// Will be discontinued on June 6, 2025
displayName: 'GPT-4 32K',
functionCall: true,
id: 'gpt-4-32k',
pricing: {
input: 60,
output: 120,
},
},
{
contextWindowTokens: 32_768,
// Will be discontinued on June 6, 2025
description:
'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。',
displayName: 'GPT-4 32K 0613',
functionCall: true,
id: 'gpt-4-32k-0613',
pricing: {
input: 60,
output: 120,
},
},
{
contextWindowTokens: 16_385,
description:
'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125',
displayName: 'GPT-3.5 Turbo',
functionCall: true,
id: 'gpt-3.5-turbo',
pricing: {
input: 0.5,
output: 1.5,
},
},
{
contextWindowTokens: 16_385,
description:
'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125',
displayName: 'GPT-3.5 Turbo 0125',
functionCall: true,
id: 'gpt-3.5-turbo-0125',
pricing: {
input: 0.5,
output: 1.5,
},
},
{
contextWindowTokens: 16_385,
description:
'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125',
displayName: 'GPT-3.5 Turbo 1106',
functionCall: true,
id: 'gpt-3.5-turbo-1106',
pricing: {
input: 1,
output: 2,
},
},
{
contextWindowTokens: 4096,
description:
'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125',
displayName: 'GPT-3.5 Turbo Instruct',
id: 'gpt-3.5-turbo-instruct',
pricing: {
input: 1.5,
output: 2,
},
},
],
checkModel: 'gpt-4o-mini',
description:
'OpenAI 是全球领先的人工智能研究机构,其开发的模型如GPT系列推动了自然语言处理的前沿。OpenAI 致力于通过创新和高效的AI解决方案改变多个行业。他们的产品具有显著的性能和经济性,广泛用于研究、商业和创新应用。',
enabled: true,
id: 'openai',
modelList: { showModelFetcher: true },
modelsUrl: 'https://platform.openai.com/docs/models',
name: 'OpenAI',
settings: {
showModelFetcher: true,
},
url: 'https://openai.com',
};
export default OpenAI;