mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-27 09:54:27 +01:00
Add 'Debug simple typo with guidance' challenge (#65)
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
random string Hello World!
|
||||
@@ -4,9 +4,10 @@
|
||||
"task": "Write the string 'random string' before any existing text to the file called file_to_check.txt",
|
||||
"dependencies": ["basic_write_file"],
|
||||
"ground": {
|
||||
"answer": "random string: Hello World!",
|
||||
"should_contain": ["random string: Hello World!"],
|
||||
"files": ["file_to_check.txt"]
|
||||
"answer": "random string Hello World!",
|
||||
"should_contain": ["random string", "Hello World!"],
|
||||
"files": ["file_to_check.txt"],
|
||||
"type": "file"
|
||||
},
|
||||
"mock": {
|
||||
"mock_func": "basic_read_file_mock"
|
||||
|
||||
@@ -15,7 +15,9 @@ class TestReadFile(BasicChallenge):
|
||||
@pytest.mark.depends(on=["basic_write_file"], name="basic_read_file")
|
||||
def test_method(self, config: Dict[str, Any]) -> None:
|
||||
self.setup_challenge(config)
|
||||
files_contents = self.open_files(config["workspace"], self.data.ground.files)
|
||||
files_contents = self.get_artifacts_out(
|
||||
config["workspace"], self.data.ground.files
|
||||
)
|
||||
|
||||
scores = []
|
||||
for file_content in files_contents:
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
"answer": "Washington",
|
||||
"should_contain": ["Washington"],
|
||||
"should_not_contain": ["New York", "Los Angeles", "San Francisco"],
|
||||
"files": [".txt"]
|
||||
"files": [".txt"],
|
||||
"type": "file"
|
||||
},
|
||||
"mock": {
|
||||
"mock_func": "basic_write_file_mock",
|
||||
|
||||
@@ -16,7 +16,9 @@ class TestWriteFile(BasicChallenge):
|
||||
def test_method(self, config: Dict[str, Any]) -> None:
|
||||
self.setup_challenge(config)
|
||||
|
||||
files_contents = self.open_files(config["workspace"], self.data.ground.files)
|
||||
files_contents = self.get_artifacts_out(
|
||||
config["workspace"], self.data.ground.files
|
||||
)
|
||||
|
||||
scores = []
|
||||
for file_content in files_contents:
|
||||
|
||||
Reference in New Issue
Block a user