Skip to content

Commit

Permalink
Merge pull request Significant-Gravitas#2631 from BillSchumacher/fix-…
Browse files Browse the repository at this point in the history
…command-arg-ordering

Fix plugin command arg ordering issue.
  • Loading branch information
richbeales authored Apr 22, 2023
2 parents f9f5407 + ea26988 commit f04755b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions autogpt/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,11 @@ def execute_command(
shutdown()
else:
for command in prompt.commands:
if command_name == command["label"] or command_name == command["name"]:
return command["function"](*arguments.values())
if (
command_name == command["label"].lower()
or command_name == command["name"].lower()
):
return command["function"](**arguments)
return (
f"Unknown command '{command_name}'. Please refer to the 'COMMANDS'"
" list for available commands and only respond in the specified JSON"
Expand Down

0 comments on commit f04755b

Please sign in to comment.