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.
formatting
Alrik Olson8186ccb56a52
diff --git a/scripts/prompt.py b/scripts/prompt.pyindex 286002ee2d..188603a3ba 100644--- a/scripts/prompt.py+++ b/scripts/prompt.py@@ -1,9 +1,10 @@from promptgenerator import PromptGenerator+def get_prompt():"""This function generates a prompt string that includes various constraints, commands, resources, and performance evaluations.-+Returns:str: The generated prompt string."""@@ -58,5 +59,5 @@ def get_prompt():# Generate the prompt stringprompt_string = prompt_generator.generate_prompt_string()-+return prompt_stringdiff --git a/tests/promptgenerator_tests.py b/tests/promptgenerator_tests.pyindex ac5c3a7904..181fdea63f 100644--- a/tests/promptgenerator_tests.py+++ b/tests/promptgenerator_tests.py@@ -7,6 +7,7 @@ import ossys.path.append(os.path.abspath("../scripts"))from promptgenerator import PromptGenerator+# Create a test class for the PromptGenerator, subclassed from unittest.TestCaseclass promptgenerator_tests(unittest.TestCase):@@ -81,7 +82,7 @@ class promptgenerator_tests(unittest.TestCase):self.assertIn(constraint, prompt_string)for command in commands:self.assertIn(command["name"], prompt_string)-+# Check for each key-value pair in the command args dictionaryfor key, value in command["args"].items():self.assertIn(f'"{key}": "{value}"', prompt_string)@@ -94,6 +95,7 @@ class promptgenerator_tests(unittest.TestCase):self.assertIn("resources", prompt_string.lower())self.assertIn("performance evaluation", prompt_string.lower())+# Run the tests when this script is executedif __name__ == '__main__':unittest.main()