mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 06:24:20 +01:00
basic challenges, more ChallengeData structure
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import pytest
|
||||
from agbenchmark.challenges.define_task_types import ChallengeData
|
||||
from agbenchmark.Challenge import Challenge
|
||||
import os
|
||||
|
||||
data = ChallengeData.deserialize(
|
||||
os.path.join(os.path.dirname(__file__), "w_file_data.json")
|
||||
)
|
||||
|
||||
|
||||
class TestWriteFile(Challenge):
|
||||
"""Testing if LLM can write to a file"""
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"server_response",
|
||||
[(data.task, data.mock_func)],
|
||||
indirect=True,
|
||||
)
|
||||
@pytest.mark.basic
|
||||
def test_retrieval(self, workspace):
|
||||
file = self.open_file(workspace, data.ground.files[0])
|
||||
|
||||
score = self.scoring(file, data.ground)
|
||||
|
||||
print("You score is:", score)
|
||||
|
||||
assert score
|
||||
Reference in New Issue
Block a user