AutoGPT
AutoGPT copied to clipboard
Not actually writing files to disk
⚠️ Search for existing issues first ⚠️
- [X] I have searched the existing issues, and there is no existing issue for my problem
Which Operating System are you using?
MacOS
GPT-3 or GPT-4?
GPT-4
Steps to reproduce 🕹
I asked it to create a new react app and write it with certain parameters. It does successfully execute the create-react-app command locally and those initial files get created. Then it goes through and says its going to create various source code files, but doesn't ever end up actually writing them to disk.
$ git clone -b stable-0.2.2 --depth 1 [email protected]:Significant-Gravitas/Auto-GPT.git
$ git rev-parse HEAD f5a2acd82a57d8f8579cc31042de53a3b9f8b8c0
Current behavior 😯
It says what its going to do, but then never does it. You can see in the logs where it does successfully run the local command, but after that no commands are run and the Roster.js file that it says its creating is never created.
Expected behavior 🤔
It should write the new source files to disk
Your prompt 📝
Create a frontend-only react app called called baseball-coach-helper that allows a coach to create their roster with controls for adding one player at a time to the list of players. Each player row should have a name and checkboxes for the positions "P", "C", "1B", "2B", "3B", "SS", and "Outfield" indicating whether that player can play those positions. The "2B", "3B", "SS", and "Outfield" checkboxes should be checked by default and the others should not. There should be a button to add another player the roster and existing players should all be editable. There should also be a button to delete a player from the roster.
There should be another component for defining the following configuration restraints: rotate the pitcher each inning, no player plays the outfield two innings in a row, rotate the catcher each inning if possible, rotate the other positions as much as possible, play 4 outfielders. The play 4 outfielders constraint should only be allowed if there are 4 or more players in the roster.
Have another component that asks for the number of innings in the game and has a button that uses the names in the roster to generate a randomized batting order as well as a set of defensive assignments that respect as many of the constraints as possible. If its not possible to meet the "No player plays the outfield two innings in a row" constraint then you should relax that constraint when necessary to assign all the positions. If there are only 8 players, the outfield assignments consist of Left-Center Field ("LCF") and Right-Center Field ("RCF"). If there are 9 players there should be three outfielders ("LF", "CF", "RF") and if there are 10 players are more, give the coach an optional constraint to play 4 outfielders ("LF", "LCF", "RCF", "RF"). Display the batting order and defensive positions for each inning in tabular format.
Make sure that the roster list, player position configurations, and defensive configuration constraints are saved into the browser’s localstorage. There should also be a button to clear all the data from localstorage and start the page fresh.
Write out all the code for this application to disk, then generate a set of test cases for this website and run the test cases to prove the website works correctly.
Your Logs 📒
THOUGHTS: I think the first task is to create a frontend-only react app called baseball-coach-helper. I can use the 'create-react-app' command to create a new react app. I will also need to install the 'react-bootstrap' package to use Bootstrap components in the app. I will use the 'npm' command to install this package.
REASONING: The first step in creating the baseball-coach-helper app is to create a new react app using the 'create-react-app' command. I will also need to install the 'react-bootstrap' package to use Bootstrap components in the app.
PLAN:
- Use the 'create-react-app' command to create a new react app called 'baseball-coach-helper'.
- Use the 'npm' command to install the 'react-bootstrap' package.
CRITICISM: N/A
NEXT ACTION: COMMAND = execute_shell ARGUMENTS = {'command_line': 'npx create-react-app baseball-coach-helper && cd baseball-coach-helper && npm install react-bootstrap'}
Enter 'y' to authorise command, 'y -N' to run N continuous commands, 'n' to exit program, or enter feedback for ...
Input:y -5
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-=
Executing command 'npx create-react-app baseball-coach-helper && cd baseball-coach-helper && npm install react-bootstrap' in working directory '/Users/ctindel/src/Auto-GPT/auto_gpt_workspace'
SYSTEM: Command execute_shell returned: STDOUT: b'\nCreating a new React app in /Users/ctindel/src/Auto-GPT/auto_gpt_workspace/baseball-coach-helper.\n\nInstalling packages. This might take a couple of minutes.\nInstalling react, react-dom, and react-scripts with cra-template...\n\n\nadded 1422 packages in 52s\n\n234 packages are looking for funding\n run `npm fund` for details\n\nInstalling template dependencies using npm...\n\nadded 62 packages, and changed 1 package in 5s\n\n234 packages are looking for funding\n run `npm fund` for details\nRemoving template package using npm...\n\n\nremoved 1 package, and audited 1484 packages in 1s\n\n234 packages are looking for funding\n run `npm fund` for details\n\n6 high severity vulnerabilities\n\nTo address all issues (including breaking changes), run:\n npm audit fix --force\n\nRun `npm audit` for details.\n\nSuccess! Created baseball-coach-helper at /Users/ctindel/src/Auto-GPT/auto_gpt_workspace/baseball-coach-helper\nInside that directory, you can run several commands:\n\n npm start\n Starts the development server.\n\n npm run build\n Bundles the app into static files for production.\n\n npm test\n Starts the test runner.\n\n npm run eject\n Removes this tool and copies build dependencies, configuration files\n and scripts into the app directory. If you do this, you can\xe2\x80\x99t go back!\n\nWe suggest that you begin by typing:\n\n cd baseball-coach-helper\n npm start\n\nHappy hacking!\n\nadded 18 packages, and audited 1502 packages in 4s\n\n235 packages are looking for funding\n run `npm fund` for details\n\n6 high severity vulnerabilities\n\nTo address all issues (including breaking changes), run:\n npm audit fix --force\n\nRun `npm audit` for details.\n' STDERR: b''
THOUGHTS: The next step is to create the player roster component. I will create a new file called 'Roster.js' in the 'src' directory and add the necessary code to create the roster component. I will also add the 'react-bootstrap' components to the file to create the necessary UI elements.
REASONING: The next step is to create the player roster component. This component will allow the coach to create their roster with controls for adding one player at a time to the list of players. I will create a new file called 'Roster.js' in the 'src' directory and add the necessary code to create the roster component. I will also add the 'react-bootstrap' components to the file to create the necessary UI elements.
PLAN:
- Create a new file called 'Roster.js' in the 'src' directory.\n- Add the necessary code to create the roster component.\n- Add the 'react-bootstrap' components to the file to create the necessary UI elements.
CRITICISM: N/A
NEXT ACTION: COMMAND = do_nothing ARGUMENTS = {}
SYSTEM: Command do_nothing returned: No action performed.
THOUGHTS: I will now write the necessary code to create the player roster component in the 'Roster.js' file. I will use the 'react-bootstrap' components to create the necessary UI elements.
REASONING: The next step is to write the necessary code to create the player roster component in the 'Roster.js' file. I will use the 'react-bootstrap' components to create the necessary UI elements.
PLAN:
- Open the 'Roster.js' file.\n- Write the necessary code to create the player roster component.\n- Use the 'react-bootstrap' components to create the necessary UI elements.
CRITICISM: N/A
NEXT ACTION: COMMAND = do_nothing ARGUMENTS = {}
SYSTEM: Command do_nothing returned: No action performed.
THOUGHTS: I will start by creating the basic structure of the Roster component in the Roster.js file. I will import the necessary react-bootstrap components and create a table to display the player roster. I will also add a button to add a new player to the roster.
It seems to be a prompting issue. You can just play around with it a bit. There are a bunch of PRs in flight to help with this behavior further down the road and get the proper commands running more frequently.
@ntindle But what is the prompting issue? I literally say in the 5th goal "Write out all the code for this application to disk"
The system is deciding to do nothing instead of writing the actual file. I’d play around with that last line to see how it changes
@ntindle Have you seen any example prompts that are known to work to make it actually write the file?
Yeah, I was much less specific on my prompts and got it to successfully write to a file. It was something like
Make a list of recipes for dinner
- write the recipes to recipe-x.txt where x is the thing the recipe is for
- do five recipes
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.