-
Notifications
You must be signed in to change notification settings - Fork 45.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into test-add-first-chat-test
- Loading branch information
Showing
30 changed files
with
522 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
branches: [ master, ci-test*] | ||
paths-ignore: | ||
- 'tests/Auto-GPT-test-cassettes' | ||
- 'tests/integration/challenges/current_score.json' | ||
pull_request_target: | ||
branches: [ master, stable , ci-test*] | ||
|
||
|
@@ -119,6 +120,7 @@ jobs: | |
- name: Run pytest tests with coverage | ||
run: | | ||
pytest -n auto --cov=autogpt --cov-report term-missing --cov-branch --cov-report xml --cov-report term | ||
python tests/integration/challenges/utils/build_current_score.py | ||
env: | ||
CI: true | ||
PROXY: ${{ secrets.PROXY }} | ||
|
@@ -131,11 +133,20 @@ jobs: | |
- name: Update cassette submodule to push target if push event | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
cd tests/Auto-GPT-test-cassettes | ||
current_branch=$(echo ${{ github.ref }} | sed -e "s/refs\/heads\///g") | ||
git fetch origin $current_branch | ||
git config --global user.name "Auto-GPT-Bot" | ||
git config --global user.email "[email protected]" | ||
git add tests/integration/challenges/current_score.json | ||
if ! git diff-index --quiet HEAD; then | ||
git commit -m "Update current score" | ||
git push origin HEAD:refs/heads/$current_branch | ||
else | ||
echo "The current score didn't change." | ||
fi | ||
cd tests/Auto-GPT-test-cassettes | ||
git fetch origin $current_branch | ||
git add . | ||
# Check if there are any changes | ||
|
@@ -150,7 +161,7 @@ jobs: | |
git commit -m "Update submodule reference" | ||
git push origin HEAD:refs/heads/$current_branch | ||
else | ||
echo "No changes to commit" | ||
echo "No cassettes changes to commit" | ||
exit 0 | ||
fi | ||
|
@@ -182,7 +193,7 @@ jobs: | |
echo "DIFF_EXISTS=false" >> $GITHUB_ENV | ||
fi | ||
|
||
- name: Apply or remove prompt change label and comment | ||
- name: Apply or remove behaviour change label and comment | ||
if: ${{ github.event_name == 'pull_request_target' }} | ||
run: | | ||
PR_NUMBER=${{ github.event.pull_request.number }} | ||
|
@@ -195,14 +206,14 @@ jobs: | |
-H "Authorization: Bearer $TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/$REPO/issues/$PR_NUMBER/labels \ | ||
-d '{"labels":["prompt change"]}' | ||
-d '{"labels":["behaviour change"]}' | ||
echo $TOKEN | gh auth login --with-token | ||
gh api repos/$REPO/issues/$PR_NUMBER/comments -X POST -F body="You changed AutoGPT's prompt. The cassettes have been updated and will be merged to the submodule when this Pull Request gets merged." | ||
gh api repos/$REPO/issues/$PR_NUMBER/comments -X POST -F body="You changed AutoGPT's behaviour. The cassettes have been updated and will be merged to the submodule when this Pull Request gets merged." | ||
else | ||
echo "Removing label..." | ||
curl -X DELETE \ | ||
-H "Authorization: Bearer $TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/$REPO/issues/$PR_NUMBER/labels/prompt%20change | ||
https://api.github.com/repos/$REPO/issues/$PR_NUMBER/labels/behaviour%20change | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Information Retrieval Challenge B | ||
|
||
**Status**: Beaten | ||
|
||
**Command to try**: | ||
|
||
``` | ||
pytest -s tests/integration/challenges/information_retrieval/test_information_retrieval_challenge_b.py | ||
``` | ||
|
||
## Description | ||
|
||
The agent's goal is to find the names, affiliated university, and discovery of the individuals who won the nobel prize for physics in 2010. | ||
|
||
It should write the result in a file called 2010_nobel_prize_winners.txt. | ||
|
||
The agent should be able to beat this test consistently (this is the hardest part). | ||
|
||
## Objective | ||
|
||
The objective of this challenge is to test the agent's ability to retrieve multiple pieces of related information in a consistent way. | ||
The agent should not use google to perform the task, because it should already know the answer. This why the task fails after 2 cycles (1 cycle to retrieve information, 1 cycle to write the file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.