File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,20 @@ async def async_model_info():
1111 any_model_change = False
1212 if model_list :
1313 for model in model_list :
14+ current_model_change = False
1415 if model .api_domain .startswith ("http" ):
1516 if model .api_key :
1617 model .api_key = await sqlbot_encrypt (model .api_key )
1718 if model .api_domain :
1819 model .api_domain = await sqlbot_encrypt (model .api_domain )
19- session .add (model )
2020 any_model_change = True
21+ current_model_change = True
22+ if model .supplier and model .supplier == 12 :
23+ model .supplier = 15
24+ any_model_change = True
25+ current_model_change = True
26+ if current_model_change :
27+ session .add (model )
2128 if any_model_change :
2229 session .commit ()
2330 SQLBotLogUtil .info ("✅ 异步加密已有模型的密钥和地址完成" )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import icon_txhy_colorful from '@/assets/model/icon_txhy_colorful.png'
1010import icon_hsyq_colorful from '@/assets/model/icon_hsyq_colorful.png'
1111// import icon_vllm_colorful from '@/assets/model/icon_vllm_colorful.png'
1212import icon_common_openai from '@/assets/model/icon_common_openai.png'
13- import icon_azure_openAI_colorful from '@/assets/model/icon_Azure_OpenAI_colorful.png'
13+ // import icon_azure_openAI_colorful from '@/assets/model/icon_Azure_OpenAI_colorful.png'
1414
1515type ModelArg = { key : string ; val ?: string | number ; type : string ; range ?: string }
1616type ModelOption = { name : string ; api_domain ?: string ; args ?: ModelArg [ ] }
@@ -279,7 +279,7 @@ export const supplierList: Array<{
279279 },
280280 },
281281 }, */
282- {
282+ /* {
283283 id: 12,
284284 name: 'Azure OpenAI',
285285 icon: icon_azure_openAI_colorful,
@@ -307,7 +307,7 @@ export const supplierList: Array<{
307307 ],
308308 },
309309 },
310- } ,
310+ }, */
311311 {
312312 id : 15 ,
313313 name : '通用OpenAI' ,
You can’t perform that action at this time.
0 commit comments