Skip to content

Commit

Permalink
Refactored configs loading
Browse files Browse the repository at this point in the history
  • Loading branch information
kirgrim committed Mar 10, 2024
1 parent 2a41d44 commit 28431bf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions neon_llm_core/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
def load_legacy_config() -> Union[dict, None]:
legacy_config_path = os.getenv("NEON_LLM_LEGACY_CONFIG", "/app/app/config.json")
if isfile(legacy_config_path):
LOG.warning(f"Deprecated configuration found at {legacy_config_path}")
with open(legacy_config_path) as f:
config = json.load(f)
init_log(config=config)
Expand All @@ -65,9 +64,9 @@ def load_config() -> Union[dict, None]:
"""
configs_loading_order = (load_legacy_config, load_ovos_config, load_default_config,)
for config_loader in configs_loading_order:
LOG.info(f'Trying to load configs with {config_loader.__name__}')
config = config_loader()
if config:
LOG.info(f'Applied configs from loader={config_loader.__name__}()')
return config


Expand Down

0 comments on commit 28431bf

Please sign in to comment.