mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-12 09:12:38 +02:00
fixbug: call skill in api
This commit is contained in:
parent
6d3f2acddb
commit
5a03ff20ce
2 changed files with 11 additions and 3 deletions
|
|
@ -260,9 +260,16 @@ def parse_recipient(text):
|
|||
return recipient.group(1) if recipient else ""
|
||||
|
||||
|
||||
def initialize_environment():
|
||||
def initialize_environment(options=None):
|
||||
"""Load `config/config.yaml` to `os.environ`"""
|
||||
if options:
|
||||
for k, v in options.items():
|
||||
os.environ[k] = str(v)
|
||||
return
|
||||
|
||||
yaml_file_path = Path(__file__).resolve().parent.parent.parent / "config/config.yaml"
|
||||
if not yaml_file_path.exists():
|
||||
return
|
||||
with open(str(yaml_file_path), "r") as yaml_file:
|
||||
data = yaml.safe_load(yaml_file)
|
||||
for k, v in data.items():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue