Commit Graph

106 Commits

Author SHA1 Message Date
James Collins
f6da992b3e Drop AbstractSingleton as a parent class of the vector memory (#4901)
* Drop AbstractSingleton as a parent class of the vector memory

* Forgot pytest fixture in integration tests

* Revert typo
2023-07-08 09:27:43 -07:00
merwanehamadi
9f353f41c4 Use Configuration of the rearch branch (#4803) 2023-06-26 17:01:36 -07:00
merwanehamadi
cfdb24efac Link all challenges to benchmark python hook (#4786) 2023-06-24 06:20:58 -07:00
merwanehamadi
222101b30e Create run_task python hook to interface with benchmarks (#4778)
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-06-23 21:15:20 -07:00
WladBlank
32038c9f5b Fix up Python execution commands (#4756)
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-06-21 09:38:39 -07:00
merwanehamadi
4e3f832dc3 Remove config singleton (#4737) 2023-06-20 06:47:59 -07:00
Luke
2568164cb3 Fixing circular imports 2023-06-19 20:54:52 +00:00
merwanehamadi
a7f805604c Pass config everywhere in order to get rid of singleton (#4666)
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-06-18 19:05:41 -07:00
Erik Peterson
195a7fcad8 Refactor module layout of command classes (#4706) 2023-06-15 11:34:41 -07:00
Reinier van der Leer
f0a5250da5 Implement loading MemoryItems from file in JSONFileMemory (#4703)
Further changes:
* remove `init` param from `get_memory()`, replace usages by `memory.clear()`
* make token length calculation optional in `MemoryItem.dump()`
2023-06-15 17:45:14 +02:00
James Collins
6e6e7fcc9a Extract openai API calls and retry at lowest level (#3696)
* Extract open ai api calls and retry at lowest level

* Forgot a test

* Gotta fix my local docker config so I can let pre-commit hooks run, ugh

* fix: merge artiface

* Fix linting

* Update memory.vector.utils

* feat: make sure resp exists

* fix: raise error message if created

* feat: rename file

* fix: partial test fix

* fix: update comments

* fix: linting

* fix: remove broken test

* fix: require a model to exist

* fix: BaseError issue

* fix: runtime error

* Fix mock response in test_make_agent

* add 429 as errors to retry

---------

Co-authored-by: k-boikov <64261260+k-boikov@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
Co-authored-by: Luke K (pr-0f3t) <2609441+lc0rp@users.noreply.github.com>
Co-authored-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-06-14 07:59:26 -07:00
Erik Peterson
49d1a5a17b Rework plugin config to be file-based (#4673) 2023-06-13 20:54:55 -07:00
merwanehamadi
d5afbbee26 Add challenge name and level to pytest logs (#4661) 2023-06-12 08:03:14 -07:00
Erik Peterson
fd04db12fa Use prompt_toolkit to enable keyboard navigation in CLI (#4649)
* Use prompt_toolkit to enable keyboard navigation in CLI

* Also update other tests

---------

Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-06-11 14:19:42 -07:00
merwanehamadi
9150f32f8b Fix benchmark logs (#4653) 2023-06-11 15:34:57 +01:00
Erik Peterson
0594ba33a2 Pass agent to commands instead of config (#4645)
* Add config as attribute to Agent, rename old config to ai_config

* Code review: Pass ai_config

* Pass agent to commands instead of config

* Lint

* Fix merge error

* Fix memory challenge a

---------

Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-06-10 15:48:50 -07:00
Erik Peterson
6b9e3b21d3 Add config as attribute to Agent, rename old config to ai_config (#4638)
* Add config as attribute to Agent, rename old config to ai_config

* Code review: Pass ai_config

---------

Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-06-10 14:47:26 -07:00
Erik Peterson
15c6b0c1c3 Implement directory-based plugin system (#4548)
* Implement directory-based plugin system

* Fix Selenium test

---------

Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-06-10 13:16:00 -07:00
javableu
474a9c4d95 False believes challenge based on sally anne test. (#4167)
* False believes challenge based on sally anne test.

* Update test_memory_challenge_d.py

* Update challenge_d.md

Some text appearing in bold

* Update test_memory_challenge_d.py

* Update test_memory_challenge_d.py

* Update test_memory_challenge_d.py

* Update test_memory_challenge_d.py

black  test_memory_challenge_d.py

* Update test_memory_challenge_d.py

replaced the dynamic time depending of the level to a fix time

* Update test_memory_challenge_d.py

isort command for the libraries

* Refactored memory challenge a

---------

Co-authored-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-06-09 15:02:41 -07:00
Erik Peterson
ff4e53d0e6 Streamline / clarify shell command control configuration (#4628)
* Streamline / clarify shell command control configuration

* Fix lint
2023-06-09 11:48:20 -07:00
Erik Peterson
cce50bef50 Fix issues with information retrieval challenge a (#4622)
Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-06-09 11:02:52 -07:00
Erik Peterson
94280b2d14 Add command for directly executing python code (#4581)
* Add command for directly executing python code

* Fix docstring

* Clarify / update filename references

---------

Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-06-09 10:40:32 -07:00
merwanehamadi
12ed5a957b Fix debug code challenge (#4632) 2023-06-09 08:40:06 -07:00
merwanehamadi
3b0d49a3e0 Make test write file hard (#4481) 2023-06-09 07:50:57 -07:00
Erik Peterson
fdc6e12945 Improve logic and error messages for file reading and writing with Python code (#4567)
* Fix issues with file reading and writing with Python code

* Change error message, use Workspace.get_path

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-06-07 02:54:02 +02:00
Erik Peterson
055806e124 Fix inverted logic for deny_command (#4563) 2023-06-06 22:56:17 +02:00
Reinier van der Leer
dafbd11686 Rearrange tests & fix CI (#4596)
* Rearrange tests into unit/integration/challenge categories

* Fix linting + `tests.challenges` imports

* Fix obscured duplicate test in test_url_validation.py

* Move VCR conftest to tests.vcr

* Specify tests to run & their order (unit -> integration -> challenges) in CI

* Fail Docker CI when tests fail

* Fix import & linting errors in tests

* Fix `get_text_summary`

* Fix linting errors

* Clean up pytest args in CI

* Remove bogus tests from GoCodeo
2023-06-06 10:48:49 -07:00
merwanehamadi
ee6b97ef5e Fix Python CI "update cassettes" step (#4591)
* Fix updated cassettes step

* Clarifications

* Use github.ref_name instead of github.ref

* Fix duplicate runs on `master`

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-06-06 16:27:08 +02:00
Auto-GPT-Bot
60ac0c4da1 Update challenge scores 2023-06-05 14:39:45 +00:00
Reinier van der Leer
576f24e3ae Merge branch 'master' into release-0.4.0 2023-06-05 16:08:35 +02:00
merwanehamadi
59d31b021d Skip flaky challenges (#4573) 2023-06-04 18:20:13 +02:00
merwanehamadi
af28510aba Fix test_web_selenium (#4554) 2023-06-04 16:38:32 +02:00
Merwane Hamadi
02846fcf91 remove information retrieval challenge b from beaten challenges 2023-06-03 21:24:36 -07:00
Auto-GPT-Bot
55a8e242b0 Update current score 2023-06-03 14:51:53 +00:00
merwanehamadi
79ba85a22e Cache Python Packages in the CI pipeline (#4488) 2023-06-03 15:48:32 +01:00
Auto-GPT-Bot
41df0204f3 Update current score 2023-05-30 23:33:38 +00:00
Douglas Schonholtz
f6ee61d607 create debug challenge (#4286)
Co-authored-by: Merwane Hamadi <merwanehamadi@gmail.com>
Co-authored-by: symphony <john.tian31@gmail.com>
2023-05-30 16:28:32 -07:00
merwanehamadi
87776b2886 Make the information retrieval challenge a harder while still passing (#4468) 2023-05-30 15:56:58 -07:00
Auto-GPT-Bot
4c25fabec9 Update current score 2023-05-30 19:15:30 +00:00
merwanehamadi
6806b66509 Information retrieval challenge (#4456)
* test: add information retrieval challenge b

* test: get information retrieval challenge be working.

* chore: clean up comments and imports.

* chore: fix incorrect import

* chore: clean up imports.

* fix: add web_selenium cmd. resolve missing loop cycle

* chore: remove commented code and unused imports.

* fix (4261): use 2 cycles instead of 3

* chore: fix mypy formatting

* chore: try 2 for mypy formatting

* chore: resolve flake8 issues

* chore: add docs

* chore: resolve linting flake8

* chore: correct formatting to black

* Update challenge_b.md

* refactored challenge

---------

Co-authored-by: PortlandKyGuy <kyleaaron1@gmail.com>
2023-05-30 12:10:49 -07:00
Erik Peterson
b56352e218 Fix #4461: Don't record error requests in challenges (#4469)
Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-05-30 07:31:45 -07:00
merwanehamadi
22429c6e98 add vcr to dalle (#4474) 2023-05-30 06:00:37 -07:00
Auto-GPT-Bot
56650b60f4 Update current score 2023-05-30 02:33:34 +00:00
merwanehamadi
ba8046753e Update current score when PR merged (#4464) 2023-05-29 19:30:41 -07:00
merwanehamadi
1127d9c5f5 Master doesn't beat memory challenge b level 1 in a consistent manner (#4460) 2023-05-29 18:25:45 +03:00
merwanehamadi
31cd836530 "Beat Challenges" Mode (#4447)
Co-authored-by: Richard Beales <rich@richbeales.net>
2023-05-29 08:47:06 +01:00
merwanehamadi
ee9f10a8d8 remove unused imports automatically (#4449)
* remove unused imports automatically

* add linters to pr template

* remove useless try statement
2023-05-28 05:50:50 -07:00
merwanehamadi
44f6d946f5 fix information retrieval challenge (#4448) 2023-05-27 18:26:30 -07:00
k-boikov
064e95b46b Allow spinning to be disabled (#4329) 2023-05-27 00:01:34 +03:00
merwanehamadi
e7c0d3330c Create cassette submodule (#4420)
* gfeat: specify directory of cassettes and automatically load them depending on module

fix: formatting for linter

test: commit newly generated cassettes to their respective folder

tests: update latest fixtures with master

fix: update .gitattributes with updated path to cassettes

fix: use cassettes from master instead of generating them myself

fix: update path in .gitattributes

fix: make sure to match default functionality by using test name for cassette directory

fix: actually add git submodule

ci: checkout git submodules in CI

ci: update git submodules separately to ensure it gets called

feat: add a hooks directory so we can update git submodules on post-checkout

feat: make sure we push the tests/cassettes submodule on merge into master

ci: remove unused code now that we are using git submodules to keep cassettes in sync

fix: simplify how we load the submodule and fix updating cassettes on merge to master

chore: remove echo of checkout hook, it's unneeded

ci: remove unneccesary step

* cassettes submodule

* cassettes submodule

* cassettes submodule

* cassettes submodule

* cassettes submodule

---------

Co-authored-by: Stefan Ayala <stefanayala3266@gmail.com>
2023-05-26 12:33:49 -07:00