Skip to content

Commit

Permalink
Added load_dotenv to genesis cli command
Browse files Browse the repository at this point in the history
  • Loading branch information
VRSEN committed Mar 27, 2024
1 parent 5f46c4e commit 352b629
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions agency_swarm/cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import argparse
import os

from dotenv import load_dotenv


def main():
parser = argparse.ArgumentParser(description='Create agent template.')
Expand Down Expand Up @@ -28,6 +30,7 @@ def main():
from agency_swarm.util import create_agent_template
create_agent_template(args.name, args.description, args.path, args.use_txt)
elif args.command == "genesis":
load_dotenv()
if not os.getenv('OPENAI_API_KEY') and not args.openai_key:
print("OpenAI API key not set. "
"Please set it with --openai_key argument or by setting OPENAI_API_KEY environment variable.")
Expand Down

0 comments on commit 352b629

Please sign in to comment.