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
Other
167.66k stars 44.28k forks source link

Claims to write to filesystem, but doesn't #1727

Closed kittock closed 1 year ago

kittock commented 1 year ago

Version: Auto-GPT-0.2.0, no code changes, Redis in Docker for memory EDIT: using GPT3.5 only

Issue: wrote a story & claimed to write it to the filesystem, but the file in auto_gpt_workspace just contains

\<insert story text here>

Here are the contents of ai_settings.yaml:

ai_goals:
- Write a short story about a mouse having an adventure in an abandoned castle, save
  it to disk as "mouse_story.txt"
ai_name: Writer-GPT
ai_role: an AI that writes short stories

I've attached the activity log. Error log is empty.

activity.log

stankud commented 1 year ago

Are you running autogpt in docker as well @kittock?

kittock commented 1 year ago

@stankud I am not. autogpt is running directly in my Ubuntu env. I've done some more testing, and it seems that it's fully capable of writing to the filesystem. In this case, it seems to have hallucinated a bit of I/O regarding writing parts of the story to files. Then right before it quits it says:

2023-04-15 12:14:10,477 INFO NEXT ACTION: COMMAND = write_to_file ARGUMENTS = {'file': 'mouse_story.txt', 'text': '<insert story text here>'}

That's the only call to write_to_file.

It seems like there is some mismatch between thoughts and plans, for example here:

2023-04-15 12:13:06,231 INFO Apparently json was fixed. 
2023-04-15 12:13:06,377 INFO NEXT ACTION:  COMMAND = do_nothing  ARGUMENTS = {}
2023-04-15 12:13:06,882 INFO SYSTEM:  Command do_nothing returned: No action performed.
2023-04-15 12:13:21,427 INFO WRITER-GPT THOUGHTS: To begin refining the story, I will use GPT-3.5 to search for trending themes and story elements. Then, I will generate and add new story elements to the text file based on the prompts generated by GPT-3.5. I will use the story so far as a basis and add to it incrementally to avoid disrupting the overall structure.
2023-04-15 12:13:22,040 INFO REASONING: By adding new story elements and refining existing ones, we can add more depth, interest, and complexity to the story, which in turn might make it more enjoyable and distinguishable from the initial version. Using GPT-3.5 can provide ideas for trending themes and story elements.
2023-04-15 12:13:22,548 INFO PLAN: 
2023-04-15 12:13:22,611 INFO -  Use GPT-3.5 to search for trending themes and story elements.\n- Generate new story elements using prompts generated by GPT-3.5.\n- Add to and refine the existing story incrementally, using the prompts as needed.
2023-04-15 12:13:23,102 INFO CRITICISM: I need to ensure that I am adding only high-quality story elements, as opposed to adding irrelevant or off-topic elements. Also, it is essential that any new story elements added are consistent with the existing structure and narration.
2023-04-15 12:13:23,585 INFO Attempting to fix JSON by finding outermost brackets

Note that the thoughts reference writing to a file, but the plan does not. That seems to be where it got derailed.

GREEENUP commented 1 year ago

This is absolutely the most frustrating part of this growing process. I can see information being streamed to the logs, but it will not write to disk.

Stunspot commented 1 year ago

Mine is doing this with damned near all its python code. It's writing variable names instead of variable contents and ruined a night's work by filling files with <insert code here>not to mention all the time it spent getting syntax errors passing commands like "read_webiste .html". And of course, not being able to use execute_python_page isn't helping.

prettydeep commented 1 year ago

I have pdf and docx forms downloaded by Autogpt and saved in the workspace. But when I try to open them they are all corrupted. The only success I've had is when it writes a plain txt file to the workspace.

Stunspot commented 1 year ago

I've had luck today having written a function for the json_utils.py file. It's got a definition but no actual code so doesn't clean the json it's sposed to. Pretty sure it's why the bot confuses values with variable names and tries to do things like "create .py". Anyways, it hasn't hurt. Actually saw what I thought was another one of those errors a minute ago and my heart sank. Then, I saw this: "NEKOBOT THOUGHTS: The previous command failed because I forgot to replace '' with the actual website URL. I will now run the command again with the correct URL."

If anyone wants it, it's here. Again: I DON'T KNOW HOW TO CODE. I'm just trying to be helpful any way I can.

json_utils - with add_quote_to_property_names implemented.py.txt

github-actions[bot] commented 1 year 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 1 year ago

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