feat: Add Azure OpenAI Support

This commit is contained in:
fit2cloud-chenyw
2025-08-26 12:31:45 +08:00
parent 07acbd09a3
commit 6e760ef69b
2 changed files with 51 additions and 2 deletions
+30
View File
@@ -10,6 +10,7 @@ import icon_txhy_colorful from '@/assets/model/icon_txhy_colorful.png'
import icon_hsyq_colorful from '@/assets/model/icon_hsyq_colorful.png'
// import icon_vllm_colorful from '@/assets/model/icon_vllm_colorful.png'
import icon_common_openai from '@/assets/model/icon_common_openai.png'
import icon_azure_openAI_colorful from '@/assets/model/icon_Azure_OpenAI_colorful.png'
type ModelArg = { key: string; val?: string | number; type: string; range?: string }
type ModelOption = { name: string; api_domain?: string; args?: ModelArg[] }
@@ -281,6 +282,35 @@ export const supplierList: Array<{
},
},
}, */
{
id: 12,
name: 'Azure OpenAI',
icon: icon_azure_openAI_colorful,
type: 'azure',
is_private: true,
model_config: {
0: {
api_domain: 'https://{your resource name}.openai.azure.cn/',
common_args: [{ key: 'temperature', val: 0.6, type: 'number', range: '[0, 1]' }],
model_options: [
{
name: 'Azure OpenAI',
args: [
{ key: 'api_version', val: '2024-02-15-preview', type: 'string' },
{ key: 'deployment_name', val: '', type: 'string' },
],
},
{
name: 'gpt-4',
args: [
{ key: 'api_version', val: '2024-02-15-preview', type: 'string' },
{ key: 'deployment_name', val: '', type: 'string' },
],
},
],
},
},
},
{
id: 15,
name: '通用OpenAI',