mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 22:44:21 +01:00
Implements code execution command!
This allows the AI to execute code inside it's workspace folder.
This commit is contained in:
@@ -39,9 +39,9 @@ def improve_code(suggestions: List[str], code: str) -> str:
|
||||
|
||||
### Writing tests
|
||||
|
||||
def write_tests(code: str, focus: Optional[str] = None) -> str:
|
||||
def write_tests(code: str, focus: List[str]) -> str:
|
||||
function_string = "def create_test_cases(code: str, focus: Optional[str] = None) -> str:"
|
||||
args = [focus] if focus else []
|
||||
args = [code, json.dumps(focus)]
|
||||
description_string = """Generates test cases for the existing code, focusing on specific areas if required."""
|
||||
|
||||
result_string = call_ai_function(function_string, args, description_string)
|
||||
|
||||
Reference in New Issue
Block a user