AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
file creation from within file before server :)
Silen Naihin66c9e68b0430
diff --git a/agbenchmark/conftest.py b/agbenchmark/conftest.pyindex 908d39e893..434f6dbde6 100644--- a/agbenchmark/conftest.py+++ b/agbenchmark/conftest.py@@ -17,7 +17,7 @@ def config():return config[email protected](scope="module")def workspace(config):yield config["workspace"]# teardown after test function completesdiff --git a/agbenchmark/mocks/tests/basic_mocks.py b/agbenchmark/mocks/tests/basic_mocks.pyindex eb7b96541a..bbff6a9c75 100644--- a/agbenchmark/mocks/tests/basic_mocks.py+++ b/agbenchmark/mocks/tests/basic_mocks.py@@ -7,7 +7,7 @@ def basic_read_file_mock(task: str, workspace: str):This mock reads a file and returns its content."""- Challenge.write_to_file(workspace, "file_to_check.txt", "this is how we're doing")+ # Challenge.write_to_file(workspace, "file_to_check.txt", "this is how we're doing")file_contents = Challenge.open_file(workspace, "file_to_check.txt")diff --git a/agbenchmark/tests/basic_abilities/read_file/read_file_test.py b/agbenchmark/tests/basic_abilities/read_file/read_file_test.pyindex 610ccdab67..35d1d80c56 100644--- a/agbenchmark/tests/basic_abilities/read_file/read_file_test.py+++ b/agbenchmark/tests/basic_abilities/read_file/read_file_test.py@@ -8,6 +8,14 @@ data = ChallengeData.deserialize()[email protected](scope="module", autouse=True)+def setup_module(workspace):+ if data.ground.should_contain:+ Challenge.write_to_file(+ workspace, data.ground.files[0], "this is how we're doing"+ )++class TestReadFile(Challenge):"""Testing if LLM can read a file"""diff --git a/agbenchmark/tests/regression/regression_tests.txt b/agbenchmark/tests/regression/regression_tests.txtindex e69de29bb2..a5f8fbd1d2 100644--- a/agbenchmark/tests/regression/regression_tests.txt+++ b/agbenchmark/tests/regression/regression_tests.txt@@ -0,0 +1,2 @@+agbenchmark/tests/basic_abilities/write_file/write_file_test.py::TestWriteFile::test_retrieval[server_response0]+agbenchmark/tests/basic_abilities/read_file/read_file_test.py::TestReadFile::test_retrieval[server_response0]