Files
Auto-GPT/agent/agbenchmark_run.py
2023-06-26 09:27:20 -04:00

28 lines
631 B
Python

import argparse
import subprocess
import os
def main(objective):
# get the current directory
current_dir = os.path.dirname(os.path.abspath(__file__))
# form the command
command = (
f"python {os.path.join(current_dir, 'mini-agi', 'miniagi.py')} {objective}"
)
# run the command
subprocess.run(command, shell=True)
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Run miniagi.py with an objective.")
parser.add_argument(
"objective", type=str, help="The objective to pass to miniagi.py"
)
args = parser.parse_args()
main(args.objective)