Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion backend/apps/system/crud/aimodel_manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("✅ 异步加密已有模型的密钥和地址完成")
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/entity/supplier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] }
Expand Down Expand Up @@ -279,7 +279,7 @@ export const supplierList: Array<{
},
},
}, */
{
/* {
id: 12,
name: 'Azure OpenAI',
icon: icon_azure_openAI_colorful,
Expand Down Expand Up @@ -307,7 +307,7 @@ export const supplierList: Array<{
],
},
},
},
}, */
{
id: 15,
name: '通用OpenAI',
Expand Down