Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command execute_command_chain returned: Unknown command 'execute_command_chain'. Please refer to the 'COMMANDS' list for available commands and only respond in the specified JSON format. #949

Closed
1 task done
GhostfireZA opened this issue Apr 12, 2023 · 13 comments
Labels
AI model limitation Not related to AutoGPT directly.

Comments

@GhostfireZA
Copy link

GhostfireZA commented Apr 12, 2023

Duplicates

  • I have searched the existing issues

Steps to reproduce 馃暪

Just ask it to clone a git repository

Goal1: Clone, review, and clean the code: Clone the target project from my GitHub account at [GitHub here] and analyze the source code and remove any unused or unnecessary code elements.

Current behavior 馃槸

PLAN:
-  Clone the GitHub repository using the 'git clone' command.
-  Verify that the clone was successful using the 'ls' command.

CRITICISM: We should remember to navigate to the desired directory before executing any the commands.

NEXT ACTION:  COMMAND = execute_command_chain ARGUMENTS = {'commands': [{'name': 'change_directory', 'args': {'directory': '~/'}}, {'name': 'make_directory', 'args': {'directory': 'projectX'}}, {'name': 'change_directory', 'args': {'directory': 'projectX'}}, {'name': 'git_clone', 'args': {'repository': '[The repo you specified]'}}, {'name': 'list_directory', 'args': {'directory': '.'}}]}

SYSTEM:  Command execute_command_chain returned: Unknown command 'execute_command_chain'. Please refer to the 'COMMANDS' list for available commands and only respond in the specified JSON format.

Expected behavior 馃

Well, it should not break

Your prompt 馃摑

Name:  Maker
Role:  a autonomous AI that acts as a Code Reviewer. Your main goals are to clone a specific GitHub repository.
Goals: ['Clone the target project from my GitHub account at https://github.com/Torantulino/Auto-GPT/ and then analyze the source code and remove any unused or unnecessary code elements.', 'Provide a comprehensive documentation of any modifications made to the original code. Organize the documentation into the sections outlined in the previous response.']
@richbeales richbeales added the AI model limitation Not related to AutoGPT directly. label Apr 12, 2023
@alexandruioanvoda
Copy link

This is genuine curiosity: why is this labeled as a limitation of the AI model, @richbeales ?

@Pwuts
Copy link
Member

Pwuts commented Apr 18, 2023

@alexandruioanvoda the model tries to execute a command that doesn't exist. It should know that based on the system prompt. So if it tries anyways, that's "dumb" or a "limitation of the AI model". Nothing we can really do about it.

@Pwuts Pwuts closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2023
@AayushGoyal22
Copy link

I am having the same issue please help

@estebgonza
Copy link

estebgonza commented Apr 25, 2023

I had the same problem when I tried to clone a repository.
I found the solution with #530

I activated EXECUTE_LOCAL_COMMANDS=True in the .env file and now it's working.

@Pwuts
Copy link
Member

Pwuts commented Apr 25, 2023

@estebgonza if that fixes your problem it's likely a side effect, rather than an actual fix. A side effect with a relatively dangerous main effect: letting your bot execute arbitrary commands on your machine. Beware.

@Mohan33821
Copy link

it is not working to me but:
Command execute_command returned: Unknown command 'execute_command'. Please refer to the 'COMMANDS' list for available commands and only respond in
the specified JSON format.

@cutmasta-kun
Copy link

For me the same. How to add a custom Command to the COMMANDS List?

@zer0int
Copy link

zer0int commented Apr 29, 2023

@cutmasta-kun
Assuming you have edited the execute_code.py to expand it with a command, you also need to add that to app.py - that is / contains the "COMMAND" list:

from autogpt.commands.execute_code import my_function

...

    elif command_name == "my_function":
        return my_function(arguments["some_returned_info"])

@cutmasta-kun
Copy link

@zer0int
Thanks for your Feedback! Indeed, I found out, that I need to Change the exact Same files and lines you mentioned 馃槄
But I didn't try it yesterday 馃檲
Oh! And I also added a few aliases, just to be sure 馃憣

@Hariel07
Copy link

I didn't understand, where what line of code do I have to put in execute_code.py and where?

@Aherontas
Copy link

@cutmasta-kun can you share with us what exactly you have done? Because what i try in my case doesn't seem to work as supposed so.

@cutmasta-kun
Copy link

@Aherontas @Hariel07 I want to try to help you:
After you cloned the repository, you have a folder in root called autogpt.
In there are the mentioned file app.py and the folder commands.
In commands are the default COMMANDS your Instance will be available to use.
You create a new file root/autogpt/commands/execute_code.py which will export the function my_function.
In root/autogpt/app.py you add the line

from autogpt.commands.execute_code import my_function

and edit the elif where the commands are listed. Just search for something in the form of:

    elif command_name == "my_function":
        return my_function(arguments["some_returned_info"])

execute_code.py and my_function are just example names.
I hope this helps you 馃槉馃憤

@zer0int I hope I explained it right ^^'

@milioe
Copy link

milioe commented May 15, 2023

Maybe you should check if your .env file does not contain quotation marks on keys which eventually impede model to take actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI model limitation Not related to AutoGPT directly.
Projects
None yet
Development

No branches or pull requests