AutoGPT
AutoGPT copied to clipboard
Check if file exists before creating new file
Duplicates
- [X] I have searched the existing issues
Summary 💡
When the goal mentions a that a "my-script.js
should be ..." (for some purpose) Auto-GPT is too eager to touch my-script.js
and then later fails on write_to_file
(as I mentioned in #3076), or write_to_file
with just the new requirements.
I have to prompt it:
You will not
write_to_file
. You will ingest the existing file and update it as necessary
...and some times it's able to use append_to_file
instead, or I may need to quickly delete the record in file_logger.txt
to allow the write_to_file
once it incorporates the changes into the existing file.
Examples 🌈
No response
Motivation 🔦
This would make Auto-GPT much more useful to work with existing files.
This may be a limit of the LLM. It would be hard to coax it into checking for existing files beforehand outside of the user prompt. We could supply chatGPT with the results of an LS call with the initial prompt, or perhaps store created files more clearly in short term memory?
Would the API be able to throw an exception or return a code to feed back a hint to the LLM that it should edit the file (unless it's already in the desired state)? This is currently what I end up doing through reprompting the LLM
good question, this is a restriction that I ran into, too: the current command manager/system doesn't seem to be designed to return more than the result of action, i.e. error codes/exceptions etc
Regardig #3076, see #3643
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.
This issue was closed automatically because it has been stale for 10 days with no activity.