AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Default input prompt to 'y' when the user hits the enter key

Open scottschluer opened this issue 2 years ago • 6 comments
trafficstars

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

scottschluer avatar May 04 '23 04:05 scottschluer

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

vercel[bot] avatar May 04 '23 04:05 vercel[bot]

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.

Boostrix avatar May 04 '23 07:05 Boostrix

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?

scottschluer avatar May 04 '23 13:05 scottschluer

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

p-i- avatar May 05 '23 00:05 p-i-

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.

Boostrix avatar May 05 '23 09:05 Boostrix

+1

anonhostpi avatar May 05 '23 17:05 anonhostpi

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.

k-boikov avatar May 10 '23 15:05 k-boikov

See also: #2252

Will close for now, maybe reopen when we deploy 1.0.

suggestion for a new label then: revisit after 1.0 :-)

Boostrix avatar May 10 '23 15:05 Boostrix

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.

Wladastic avatar May 15 '23 19:05 Wladastic