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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to Navigate Outside Working Directory. #23

Closed
nathanlannan opened this issue Apr 2, 2023 · 11 comments · Fixed by #1875
Closed

Ability to Navigate Outside Working Directory. #23

nathanlannan opened this issue Apr 2, 2023 · 11 comments · Fixed by #1875
Labels
enhancement New feature or request

Comments

@nathanlannan
Copy link

Currently, the best workaround is bringing the desired context into the working directory, but implementing the ability to crawl through files more gracefully would be great. Perhaps for fully autonomous users, this could be an opt-in or out type thing.

SYSTEM: Command read_file returned: Error: Attempted to access outside of working directory.

(This project rocks by the way, great work!)

@Torantulino
Copy link
Member

Yeah, it's an interesting option.

I think the major concern from that though would be that it could, and would easily delete/overwrite files.

I have been playing about with the same approach as you, cloning the repo into the AI's working directory! 😆

@Torantulino
Copy link
Member

Thank you so much for the kind words 😊 I'm glad you're enjoying it!

@alwinraju
Copy link

alwinraju commented Apr 5, 2023

What exactly is the working directory for this? I have put my file in the same folder as the main.py file and it still gives me an error saying it's outside the Working Directory. I am working on an M1 Mac, is there other permissions I need to grant for it to have access?

@xcreateadmin
Copy link

What exactly is the working directory for this? I have put my file in the same folder as the main.py file and it still gives me an error saying it's outside the Working Directory. I am working on an M1 Mac, is there other permissions I need to grant for it to have access?

same issue on my M1 Mac

@JacobFV
Copy link

JacobFV commented Apr 6, 2023

I tried making a link to the workspace from inside the AutoGPT dir:

~/github/Auto-GPT on master! ⌚ 9:42:38
$ ln -s ~/code/<my_repo>

(Note: From my use, the search_files always returns an empty list, regardless of whether accessing an inode actually under AutoGPT or just a link.)

@Nonary
Copy link

Nonary commented Apr 7, 2023

What exactly is the working directory for this? I have put my file in the same folder as the main.py file and it still gives me an error saying it's outside the Working Directory. I am working on an M1 Mac, is there other permissions I need to grant for it to have access?

It's the "auto_gpt_workspace" folder.

@findlestick
Copy link

It's the "auto_gpt_workspace" folder.

So, putting the file that you want it to read, inside of "auto_gpt_workspace" should let the program access it?

@vvp3
Copy link

vvp3 commented Apr 8, 2023

I have my files in project folders. it is really cumbersome to move them around.
Also another big issue is that files have references to other files in the project folder, so auto-gpt should be optimised to read the referenced files as well, isn't it ?

@vvp3
Copy link

vvp3 commented Apr 8, 2023

I am trying to search in the code where is this folder, but i think it should be like an option in the begining to choose the working folder .

Also, another suggestion would be to really do something about the agents like you wrote here ;)

# Soon this will go in a folder where it remembers more stuff about the run(s)
SAVE_FILE = os.path.join(os.path.dirname(__file__), '..', 'ai_settings.yaml')

workaround is to save each yaml file as a backup

@FatStinkyPanda
Copy link

FatStinkyPanda commented Apr 11, 2023

I'm still getting the message "error: attempted to access outside of working directory". I have saved a .py file to the workspace directory and have tasked auto-gpt with completing the code. I've given auto-gpt the location of the directory "C:auto_gpt\auto_gpt_workspace" for it's goals and description prompts and "C:auto_gpt" is where I run auto-gpt in powershell. With a blank .py file or a .py program template with descriptions and context it continues to have the error message. I've seen people have auto-gpt write code and I'm very excited to try it out myself.

@richbeales richbeales added the enhancement New feature or request label Apr 12, 2023
@styks1987
Copy link

styks1987 commented Apr 12, 2023

Using a symlink works for me.

ln -s /path/to/my/app ./auto_gpt_workspace

Then in your goals you could write something like

Write documentation for all the functions in app/functions/stripe-hook/stripe.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.