Significant-Gravitas / AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
https://agpt.co
MIT License
166.08k stars 43.97k forks source link

Instruct AI to use relative paths when restricted to workspace #2290

Closed FakeSnake618 closed 11 months ago

FakeSnake618 commented 1 year ago

⚠️ Search for existing issues first ⚠️

GPT-3 or GPT-4

Steps to reproduce 🕹

PLAN:

Current behavior 😯

No response

Expected behavior 🤔

No response

Your prompt 📝

# Paste your prompt here
Pwuts commented 1 year ago

This is intended behavior. If you want to be able to access files outside the workspace, keep an eye on #1875

moltra commented 1 year ago

@Pwuts @Torantulino @FakeSnake618
I think that this is a valid issue, Auto-GPT is trying to create a folder outside of the sandboxed workspace. I am getting the same error.

Auto-GPT Prompt:

`THOUGHTS: I suggest we start by cloning the Power BI visuals repository to get started with developing custom visuals using TypeScript.

REASONING: Cloning the repository will give us access to the necessary files and code to get started with developing custom visuals using TypeScript.

PLAN:

CRITICISM: I need to ensure that the repository is cloned successfully and that we have access to all the necessary files.

NEXT ACTION: COMMAND = clone_repository ARGUMENTS = {'repository_url': 'https://github.com/microsoft/powerbi-visuals.git', 'clone_path': '/home/user/powerbi-visuals'}

Enter 'y' to authorise command, 'y -N' to run N continuous commands, 'n' to exit program, or enter feedback for ... Input:y -=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-= SYSTEM: Command clone_repository returned: Error: Attempted to access path '/home/user/powerbi-visuals' outside of working directory '/home/appuser/auto_gpt_workspace'. ` it should be trying to create the Repo in "/home/appuser/autogpt/powerbi_visuals"

richstokes commented 1 year ago

Is there a way to tell AutoGPT to use a specific directory when cloning git repos?

Getting:

Command clone_repository returned: Error: Attempted to access path outside of workspace

but it should know that it can clone the repo to the relative/workspace dir

revoluter commented 1 year ago

Try this as an input: try to use relative paths instead of absolute paths

lmflorentino commented 1 year ago

@revoluter

Image

wrong.

psvensson commented 1 year ago

It is still a problem in master that it always looks for files (read or write) inside /app/autogpt/auto_gpt_workspace when the workspace is actually mounted at /app/auto_gpt_workspace.

Is there any developer who runs docker and tries local file access? Try it. Just see how it works

lmflorentino commented 1 year ago

I tried to run docker but failed too. This project smells very bad.

Pwuts commented 1 year ago

@psvensson: _It is still a problem in master that it always looks for files (read or write) inside /app/autogpt/auto_gpt_workspace when the workspace is actually mounted at /app/auto_gptworkspace.

Is there any developer who runs docker and tries local file access? Try it. Just see how it works

@Pwuts: is this still an issue?

@psvensson: Sorry for the delay. No, this problem was fixed shortly after IIRC. The reason for the problem was that the working directory was assumed to be one level off when running in Docker. I had a fix for that, but it was simpler to solve it elsewhere. ANyhow things worked as they should shortly after. I'm currenty not doing any work on anything since I still have not regained gpt-4 API access and without that everything just crumbles in my hand.

github-actions[bot] commented 11 months ago

This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.

github-actions[bot] commented 11 months ago

This issue was closed automatically because it has been stale for 10 days with no activity.