File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 33import logging
44from typing import Any , Optional
55
6+ # We want to support environment variable replacement in the configuration
7+ # similarly to how it is done in llama-stack, so we use their function directly
8+ from llama_stack .core .stack import replace_env_vars
9+
610import yaml
711from models .config import (
812 Configuration ,
1620 DatabaseConfiguration ,
1721)
1822
23+
1924logger = logging .getLogger (__name__ )
2025
2126
@@ -38,6 +43,7 @@ def load_configuration(self, filename: str) -> None:
3843 """Load configuration from YAML file."""
3944 with open (filename , encoding = "utf-8" ) as fin :
4045 config_dict = yaml .safe_load (fin )
46+ config_dict = replace_env_vars (config_dict )
4147 logger .info ("Loaded configuration: %s" , config_dict )
4248 self .init_from_dict (config_dict )
4349
You can’t perform that action at this time.
0 commit comments