Support agent protocol (#337)

Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
This commit is contained in:
merwanehamadi
2023-08-30 19:44:39 -07:00
committed by GitHub
parent 8644dcc216
commit afb59a0778
57 changed files with 462 additions and 381 deletions

View File

@@ -61,10 +61,6 @@ jobs:
run: poetry run isort . --check
if: success() || failure()
- name: Check mypy formatting
run: poetry run mypy --ignore-missing-imports .
if: success() || failure()
- name: Check for unused imports and pass statements
run: |
cmd="poetry run autoflake --remove-all-unused-imports --recursive --ignore-init-module-imports --ignore-pass-after-docstring agbenchmark"
@@ -159,10 +155,7 @@ jobs:
pip install -r requirements.txt
pip uninstall agbenchmark -y
elif [ "$AGENT_NAME" == "mini-agi" ]; then
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env_example .env
echo "test"
elif [ "$AGENT_NAME" == "smol-developer" ]; then
python -m venv venv
source venv/bin/activate
@@ -201,28 +194,14 @@ jobs:
pip install ../../dist/*.whl
bash -c "$(curl -fsSL https://raw.githubusercontent.com/merwanehamadi/helicone/b7ab4bc53e51d8ab29fff19ce5986ab7720970c6/mitmproxy.sh)" -s start
if [ "${GITHUB_EVENT_NAME}" == "pull_request" ] || [ "${{ github.event_name }}" == "push" ]; then
set +e # Ignore non-zero exit codes and continue execution
${prefix}agbenchmark start --maintain --mock
EXIT_CODE=$?
set -e # Stop ignoring non-zero exit codes
# Check if the exit code was 5, and if so, exit with 0 instead
if [ $EXIT_CODE -eq 5 ]; then
echo "regression_tests.json is empty."
fi
${prefix}agbenchmark start --mock
${prefix}agbenchmark start --mock --category=retrieval
${prefix}agbenchmark start --mock --category=interface
${prefix}agbenchmark start --mock --category=code
${prefix}agbenchmark start --mock --category=memory
${prefix}agbenchmark start --mock --category=iterate
${prefix}agbenchmark start --mock --suite TestReturnCode
${prefix}agbenchmark start --mock --suite TestRevenueRetrieval
${prefix}agbenchmark start --test=TestWriteFile
if [ "${GITHUB_EVENT_NAME}" == "pull_request" ] || [ "${{ github.event_name }}" == "push" ]; then
cd ../..
poetry install
poetry run uvicorn server:app --reload &
sleep 5
export AGENT_NAME=mini-agi
poetry run agbenchmark start --mock --api_mode --host=http://localhost:8000
else
${prefix}agbenchmark start || echo "This command will always return a non zero exit code unless all the challenges are solved."
fi