mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-09 03:18:18 +00:00
feat(config): add environment variable support for DEFAULT_MODEL_PARAMS (#23223)
This commit is contained in:
parent
2d83d0f950
commit
7025cc94cc
1 changed files with 7 additions and 1 deletions
|
|
@ -1226,10 +1226,16 @@ DEFAULT_MODEL_METADATA = PersistentConfig(
|
|||
{},
|
||||
)
|
||||
|
||||
try:
|
||||
default_model_params = json.loads(os.environ.get('DEFAULT_MODEL_PARAMS', '{}'))
|
||||
except Exception as e:
|
||||
log.exception(f'Error loading DEFAULT_MODEL_PARAMS: {e}')
|
||||
default_model_params = {}
|
||||
|
||||
DEFAULT_MODEL_PARAMS = PersistentConfig(
|
||||
'DEFAULT_MODEL_PARAMS',
|
||||
'models.default_params',
|
||||
{},
|
||||
default_model_params,
|
||||
)
|
||||
|
||||
DEFAULT_USER_ROLE = PersistentConfig(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue