perf: Conceal Azure OpenAI-type large language models

This commit is contained in:
fit2cloud-chenyw
2025-10-10 10:43:14 +08:00
committed by fit2cloud-chenyw
parent f59bc962e3
commit d5d827da76
2 changed files with 11 additions and 4 deletions
+8 -1
View File
@@ -11,13 +11,20 @@ async def async_model_info():
any_model_change = False
if model_list:
for model in model_list:
current_model_change = False
if model.api_domain.startswith("http"):
if model.api_key:
model.api_key = await sqlbot_encrypt(model.api_key)
if model.api_domain:
model.api_domain = await sqlbot_encrypt(model.api_domain)
session.add(model)
any_model_change = True
current_model_change = True
if model.supplier and model.supplier == 12:
model.supplier = 15
any_model_change = True
current_model_change = True
if current_model_change:
session.add(model)
if any_model_change:
session.commit()
SQLBotLogUtil.info("✅ 异步加密已有模型的密钥和地址完成")
+3 -3
View File
@@ -10,7 +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'
// 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[] }
@@ -279,7 +279,7 @@ export const supplierList: Array<{
},
},
}, */
{
/* {
id: 12,
name: 'Azure OpenAI',
icon: icon_azure_openAI_colorful,
@@ -307,7 +307,7 @@ export const supplierList: Array<{
],
},
},
},
}, */
{
id: 15,
name: '通用OpenAI',