diff --git a/metagpt/configs/llm_config.py b/metagpt/configs/llm_config.py index 469613dc1..0284c8993 100644 --- a/metagpt/configs/llm_config.py +++ b/metagpt/configs/llm_config.py @@ -94,8 +94,8 @@ class LLMConfig(YamlModel): @classmethod def check_llm_key(cls, v): if v in ["", None, "YOUR_API_KEY"]: - repo_config_path=(METAGPT_ROOT / "config/config2.yaml") - root_config_path=(CONFIG_ROOT / "config2.yaml") + repo_config_path = METAGPT_ROOT / "config/config2.yaml" + root_config_path = CONFIG_ROOT / "config2.yaml" if root_config_path.exists(): raise ValueError( f"Please set your API key in {root_config_path}. If you also set your config in {repo_config_path}, \nthe former will overwrite the latter. This may cause unexpected result.\n")