mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-02 14:45:17 +02:00
Update env & test code
This commit is contained in:
parent
07c360b9c7
commit
cfc0cc1fa5
12 changed files with 248 additions and 140 deletions
|
|
@ -122,8 +122,12 @@ class Config(CLIParams, YamlModel):
|
|||
def set_other(self, other: dict):
|
||||
self.other = other
|
||||
|
||||
def get_other(self, key: str):
|
||||
return self.other.get(key)
|
||||
def get_other(self, key: str, default_value: str = None):
|
||||
if default_value is None:
|
||||
return self.other.get(key)
|
||||
else:
|
||||
return self.other.get(key, default_value)
|
||||
|
||||
|
||||
def get_openai_llm(self) -> Optional[LLMConfig]:
|
||||
"""Get OpenAI LLMConfig by name. If no OpenAI, raise Exception"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue