AutoGPT
AutoGPT copied to clipboard
Implemented showing the number of preauthorised commands left. #1035
Background
This change was inspired by user request in issue #1035, aiming to improve the user experience of Auto-GPT by providing clear information about the number of authorized commands left and the details of the next action. This enhancement is particularly useful for users who pre-authorize commands and want to track their progress.
Changes
In this pull request, the following modifications were made to the agent.py file:
- Added a conditional statement
elifunder the main control flow to handle cases whereself.next_action_count > 0andcfg.continuous_modeisFalse. - Used the
logger.typewriter_log()function to display the number of authorized commands left and the details of the next action, including the command name and its arguments.
Documentation
The changes are documented through in-code comments and this external documentation, which clearly explain the new behavior added to Auto-GPT after merging this pull request. The number of authorized commands left will be displayed in cyan color when the user is not in continuous mode, and the details of the next action, including the command name and its arguments, will be displayed in both continuous and non-continuous modes.
Test Plan
To test this functionality:
- Ran Auto-GPT with the updated
autogpt/agent/agent.pyfile . - Pre-authorized commands using
y -n, wherenis the numerical value of commands you want to authorize. - Observed the number of authorized commands left and the details of the next action being displayed after every message in the specified color when not in continuous mode.
- Verified that the output aligns with the expected behavior as described.
Flake8 and PyTest run without any issues.
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) | Visit Preview | May 13, 2023 3:13pm |
Please fill out PR
Codecov Report
Patch coverage: 100.00% and project coverage change: +0.03 :tada:
Comparison is base (
7a34d49) 60.93% compared to head (3696a10) 60.96%.
Additional details and impacted files
@@ Coverage Diff @@
## master #3322 +/- ##
==========================================
+ Coverage 60.93% 60.96% +0.03%
==========================================
Files 73 73
Lines 3315 3315
Branches 543 543
==========================================
+ Hits 2020 2021 +1
+ Misses 1156 1155 -1
Partials 139 139
| Impacted Files | Coverage Δ | |
|---|---|---|
| autogpt/agent/agent.py | 48.29% <100.00%> (+0.68%) |
:arrow_up: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
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 useful and straightforward code addition that could probably be considered for review/integration regardless of the ongoing re-arch effort ?
Thanks to everyone involved in this PR. Appreciate the efforts!
Thanks to everyone involved in this PR. Appreciate the efforts!
@xhypeDE if you haven't already, please consider joining discord to collect your contributor/catalyst status there and help us get other PRs/issues implemented, reviewed and integrated.