fix(agent): Fix `setup` and `run` scripts

- Updated the `run` script to also check if `$OPENAI_API_KEY` is empty before copying `.env.example` and prompting the user to set API keys.
- Modified the `setup` script to install `--extras benchmark` separately from the initial `poetry install` command.
- Added `POETRY_INSTALLER_PARALLEL=false` flag to prevent conflicts between `forge` and `agbenchmark` during installation.
pull/6474/head
Reinier van der Leer 2023-12-02 13:46:49 +01:00
parent 5ca48de07f
commit 2c70059c2d
No known key found for this signature in database
GPG Key ID: CDC1180FDAE06193
2 changed files with 7 additions and 2 deletions

View File

@ -2,7 +2,7 @@
kill $(lsof -t -i :8000)
if [ ! -f .env ]; then
if [ ! -f .env ] && [ -z "$OPENAI_API_KEY" ]; then
cp .env.example .env
echo "Please add your api keys to the .env file." >&2
# exit 1

View File

@ -1,4 +1,9 @@
#!/bin/sh
poetry install --no-interaction --extras benchmark
poetry install --no-interaction
# Necessary to prevent forge and agbenchmark from breaking each others' install:
# https://github.com/python-poetry/poetry/issues/6958
POETRY_INSTALLER_PARALLEL=false poetry install --no-interaction --extras benchmark
echo "Setup completed successfully."