Update llm_config.py

This commit is contained in:
usamimeri_renko 2024-06-22 14:57:47 +08:00 committed by GitHub
parent 700f9aae41
commit 76b009513a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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")