AutoGPT
AutoGPT copied to clipboard
Default input prompt to 'y' when the user hits the enter key
Background
I often find myself using AutoGPT one command at a time, in order to continually evaluate performance and provide feedback if necessary. Entering the "y" key every time is laborious over repeated cycles. Given this is the most likely option to be selected, I propose defaulting the input prompt to a value of "y" if the Enter key is pressed.
Changes
Updated agent.py to make the Enter key behave as if cfg.authorise_key was pressed and to indicate the default value in the console prompt.
Documentation
No documentation necessary
Test Plan
Local testing over repeated uses.
PR Quality Checklist
- [x] My pull request is atomic and focuses on a single change.
- [x] I have thoroughly tested my changes with multiple different prompts.
- [x] I have considered potential risks and mitigations for my changes.
- [x] I have documented my changes clearly and comprehensively.
- [x] I have not snuck in any "extra" small tweaks changes
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docs | ⬜️ Ignored (Inspect) | May 5, 2023 0:44am |
thanks for working on this, much appreciated. One tiny request: Could you also modify the prompt to show Y/n [ENTER] (capital Y to indicate the default being Y) ? That would be in line with most CLI applications - unless you have a better idea obviously.
thanks for working on this, much appreciated. One tiny request: Could you also modify the prompt to show Y/n [ENTER] (capital Y to indicate the default being Y) ? That would be in line with most CLI applications - unless you have a better idea obviously.
Thanks for taking the time to review it! I had anticipated this request coming up, but I wasn't sure what the best approach was, so I figured I'd see if anyone raised the issue. The user has several options on the command line:
- y: Continue
- y -x: Continue x times
- s: self-feedback
- n: Exit
- text: Human feedback
Given that the user has more options than just y/n, two of which include multi-character input (y -x and human feedback), I wasn't sure how to best represent that at the command line level, which is why I simply indicated that y was the default.
If I incorporate your feedback directly, the prompt would look like this:
Input [Y/n]:
If I wanted it to show all possible single-character options:
Input [Y/n/s]:
I'm not sure how best to structure the prompt to include the ability to provide text input or the authorized count here too.
Thoughts on which direction we should go?
This is a mass message from the AutoGPT core team. Our apologies for the ongoing delay in processing PRs. This is because we are re-architecting the AutoGPT core!
For more details (and for infor on joining our Discord), please refer to: https://github.com/Significant-Gravitas/Auto-GPT/wiki/Architecting
this looks like a straightforward and useful addition that should ideally be considered to as a candidate to be reviewed prior to/during the ongoing re-arch effort.
+1
That would allow for accidental confirmations. The need to type "y" is for a reason. Since we are still in beta, lets keep it this way. We have the continuous mode for the YOLO users. Will close for now, maybe reopen when we deploy 1.0.
See also: #2252
Will close for now, maybe reopen when we deploy 1.0.
suggestion for a new label then: revisit after 1.0 :-)
I actually suggest turning this into a requery if the user really wanted to Enter "nothing" and not let auto-gpt continue unless y is pressed. Also "nothing" is sometimes a valid input already. I made such change as well, but that was the reason I took it out again.