aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautogpts/forge/run8
-rwxr-xr-xautogpts/forge/setup13
-rw-r--r--cli.py9
3 files changed, 20 insertions, 10 deletions
diff --git a/autogpts/forge/run b/autogpts/forge/run
index a49404b85..5d676909a 100755
--- a/autogpts/forge/run
+++ b/autogpts/forge/run
@@ -1,15 +1,7 @@
#!/bin/bash
kill $(lsof -t -i :8000)
- ENV_PATH=$(poetry env info --path)
- if [ -d "$ENV_PATH" ]; then
- rm -rf $ENV_PATH
- echo "Removed the poetry environment at $ENV_PATH."
- else
- echo "No poetry environment found."
- fi
- poetry install
if [ ! -f .env ]; then
cp .env.example .env
echo "Please add your api keys to the .env file."
diff --git a/autogpts/forge/setup b/autogpts/forge/setup
new file mode 100755
index 000000000..e49c8b3f1
--- /dev/null
+++ b/autogpts/forge/setup
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+ ENV_PATH=$(poetry env info --path)
+ if [ -d "$ENV_PATH" ]; then
+ rm -rf $ENV_PATH
+ echo "Removed the poetry environment at $ENV_PATH."
+ else
+ echo "No poetry environment found."
+ fi
+
+ poetry install
+ echo "Setup completed successfully."
+ exit 0
diff --git a/cli.py b/cli.py
index a387833ed..705aae299 100644
--- a/cli.py
+++ b/cli.py
@@ -266,10 +266,15 @@ def start(agent_name):
script_dir = os.path.dirname(os.path.realpath(__file__))
agent_dir = os.path.join(script_dir, f"autogpts/{agent_name}")
run_command = os.path.join(agent_dir, "run")
- if os.path.exists(agent_dir) and os.path.isfile(run_command):
+ run_bench_command = os.path.join(agent_dir, "run_benchmark")
+ if os.path.exists(agent_dir) and os.path.isfile(run_command) and os.path.isfile(run_bench_command):
os.chdir(agent_dir)
+ setup_process = subprocess.Popen(["./setup"], cwd=agent_dir)
+ setup_process.wait()
+ subprocess.Popen(["./run_benchmark", "serve"], cwd=agent_dir)
+ click.echo(f"Benchmark Server starting please wait...")
subprocess.Popen(["./run"], cwd=agent_dir)
- click.echo(f"Agent '{agent_name}' started")
+ click.echo(f"Agent '{agent_name}' starting please wait...")
elif not os.path.exists(agent_dir):
click.echo(
click.style(