Skip to content

Commit 07acbd0

Browse files
feat: Add Universal OpenAI Support
1 parent ca5b5cb commit 07acbd0

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed
10.5 KB
Loading

frontend/src/entity/supplier.ts

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import icon_openai_colorful from '@/assets/model/icon_openai_colorful.png'
88
import icon_kimi_colorful from '@/assets/model/icon_kimi_colorful.png'
99
import icon_txhy_colorful from '@/assets/model/icon_txhy_colorful.png'
1010
import icon_hsyq_colorful from '@/assets/model/icon_hsyq_colorful.png'
11-
import icon_vllm_colorful from '@/assets/model/icon_vllm_colorful.png'
11+
// import icon_vllm_colorful from '@/assets/model/icon_vllm_colorful.png'
12+
import icon_common_openai from '@/assets/model/icon_common_openai.png'
1213

1314
type ModelArg = { key: string; val?: string | number; type: string; range?: string }
1415
type ModelOption = { name: string; api_domain?: string; args?: ModelArg[] }
@@ -266,7 +267,7 @@ export const supplierList: Array<{
266267
},
267268
},
268269
},
269-
{
270+
/* {
270271
id: 11,
271272
name: 'vLLM',
272273
icon: icon_vllm_colorful,
@@ -279,6 +280,35 @@ export const supplierList: Array<{
279280
model_options: [],
280281
},
281282
},
283+
}, */
284+
{
285+
id: 15,
286+
name: '通用OpenAI',
287+
icon: icon_common_openai,
288+
is_private: true,
289+
model_config: {
290+
0: {
291+
api_domain: 'http://127.0.0.1:8000/v1',
292+
common_args: [{ key: 'temperature', val: 0.6, type: 'number', range: '[0, 1]' }],
293+
model_options: [
294+
{ name: 'gpt-4.1' },
295+
{ name: 'gpt-4.1-mini' },
296+
{ name: 'gpt-4.1-nano' },
297+
{ name: 'gpt-4o' },
298+
{ name: 'gpt-4o-mini' },
299+
{ name: 'chatgpt-4o' },
300+
{ name: 'o4-mini' },
301+
{ name: 'o4-mini-deep-research' },
302+
{ name: 'o3' },
303+
{ name: 'o3-pro' },
304+
{ name: 'o3-mini' },
305+
{ name: 'o3-deep-research' },
306+
{ name: 'o1' },
307+
{ name: 'o1-pro' },
308+
{ name: 'o1-mini' },
309+
],
310+
},
311+
},
282312
},
283313
]
284314

0 commit comments

Comments
 (0)