mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-06 14:54:40 +01:00
Merge pull request #2631 from BillSchumacher/fix-command-arg-ordering
Fix plugin command arg ordering issue.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user