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.
Adjust command formatting in prompt
Reinier van der Leera660619ea823
diff --git a/autogpt/models/command.py b/autogpt/models/command.pyindex c9cccf8429..a3369bb99e 100644--- a/autogpt/models/command.py+++ b/autogpt/models/command.py@@ -58,4 +58,4 @@ class Command:f"{param.name}: {param.type if param.required else f'Optional[{param.type}]'}"for param in self.parameters]- return f"{self.name}: {self.description}, params: ({', '.join(params)})"+ return f"{self.name}: {self.description}. Params: ({', '.join(params)})"diff --git a/autogpt/prompts/generator.py b/autogpt/prompts/generator.pyindex a5b69fdc67..755a3689f0 100644--- a/autogpt/prompts/generator.py+++ b/autogpt/prompts/generator.py@@ -53,7 +53,7 @@ class PromptGenerator:params_string = ", ".join(f'"{key}": "{value}"' for key, value in self.params.items())- return f'{self.label}: "{self.name}", params: ({params_string})'+ return f'{self.label}: "{self.name}". Params: ({params_string})'def add_constraint(self, constraint: str) -> None:"""diff --git a/tests/unit/test_commands.py b/tests/unit/test_commands.pyindex cf4e44adf1..25867f2162 100644--- a/tests/unit/test_commands.py+++ b/tests/unit/test_commands.py@@ -33,7 +33,7 @@ def test_command_creation():assert cmd.description == "Example command"assert cmd.method == example_command_methodassert (- str(cmd) == "example: Example command, params: (arg1: int, arg2: Optional[str])"+ str(cmd) == "example: Example command. Params: (arg1: int, arg2: Optional[str])")