mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-15 20:06:03 +08:00
fix: The init_azure_openai() method in the core/hosting_configuration.py file doesn't work (#19704) (#19705)
Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
parent
85eb55de37
commit
303c6ecc1d
@ -897,6 +897,7 @@ class ProviderConfiguration(BaseModel):
|
||||
)
|
||||
except Exception as ex:
|
||||
logger.warning(f"get custom model schema failed, {ex}")
|
||||
continue
|
||||
|
||||
if not custom_model_schema:
|
||||
continue
|
||||
@ -909,9 +910,7 @@ class ProviderConfiguration(BaseModel):
|
||||
custom_model_schema.model_type in model_setting_map
|
||||
and custom_model_schema.model in model_setting_map[custom_model_schema.model_type]
|
||||
):
|
||||
model_setting = model_setting_map[custom_model_schema.model_type][
|
||||
custom_model_schema.model
|
||||
]
|
||||
model_setting = model_setting_map[custom_model_schema.model_type][custom_model_schema.model]
|
||||
if model_setting.enabled is False:
|
||||
status = ModelStatus.DISABLED
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user