diff --git a/backend/apps/system/crud/aimodel_manage.py b/backend/apps/system/crud/aimodel_manage.py index 77d6cb5e4..2d4f5b752 100644 --- a/backend/apps/system/crud/aimodel_manage.py +++ b/backend/apps/system/crud/aimodel_manage.py @@ -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("✅ 异步加密已有模型的密钥和地址完成") diff --git a/frontend/src/entity/supplier.ts b/frontend/src/entity/supplier.ts index 6fee3c595..b9debf4f4 100644 --- a/frontend/src/entity/supplier.ts +++ b/frontend/src/entity/supplier.ts @@ -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',