mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-05 13:52:38 +02:00
Increase the priority of directly passing configurations through Config.default.
This commit is contained in:
parent
d477ce0719
commit
6597141bee
1 changed files with 1 additions and 2 deletions
|
|
@ -110,8 +110,7 @@ class Config(CLIParams, YamlModel):
|
|||
CONFIG_ROOT / "config2.yaml",
|
||||
)
|
||||
if reload or default_config_paths not in _CONFIG_CACHE:
|
||||
dicts = [kwargs, dict(os.environ)]
|
||||
dicts += [Config.read_yaml(path) for path in default_config_paths]
|
||||
dicts = [dict(os.environ), *(Config.read_yaml(path) for path in default_config_paths), kwargs]
|
||||
final = merge_dict(dicts)
|
||||
_CONFIG_CACHE[default_config_paths] = Config(**final)
|
||||
return _CONFIG_CACHE[default_config_paths]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue