diff options
Diffstat (limited to 'autogpts/autogpt/autogpt/models/command.py')
-rw-r--r-- | autogpts/autogpt/autogpt/models/command.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/autogpts/autogpt/autogpt/models/command.py b/autogpts/autogpt/autogpt/models/command.py index 98b576037..90aa266cc 100644 --- a/autogpts/autogpt/autogpt/models/command.py +++ b/autogpts/autogpt/autogpt/models/command.py @@ -62,7 +62,11 @@ class Command: def __str__(self) -> str: params = [ - f"{param.name}: {param.spec.type.value if param.spec.required else f'Optional[{param.spec.type.value}]'}" + f"{param.name}: " + + ("%s" if param.spec.required else "Optional[%s]") % param.spec.type.value for param in self.parameters ] - return f"{self.name}: {self.description.rstrip('.')}. Params: ({', '.join(params)})" + return ( + f"{self.name}: {self.description.rstrip('.')}. " + f"Params: ({', '.join(params)})" + ) |