AutoGPT
AutoGPT copied to clipboard
Report remaining budget to user
Background
Closes #6 Following #762, this PR reports the remaining and total budget to the user.
Changes
Reports the budget to the user if the budget is set. The budget is report before "NEXT ACTIONS"
Documentation
Modified print_assistant_thoughts to report the remaining budget and the total budget.
Test Plan
Wrote tests. But you can also see the change in the figure below
Questions to reviewers
- Is this too noisy? Would you prefer I make this only show if the user passes in a flag like
python -m autogpt --report_budget? - I find it useful to also include the total budget. But if this is too noisy I can remove it
- There were circular import issues. So the import is done in the function. Alternatively, I could make larger changes to the codebase, but this seemed the simplest change to make. Let me know if you want me to take another path.
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 ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 8, 2023 1:00am |
Codecov Report
Patch coverage: 100.00% and project coverage change: -0.29 :warning:
Comparison is base (
dc95959) 61.31% compared to head (61b09e8) 61.03%.
:exclamation: Current head 61b09e8 differs from pull request most recent head ebbeb48. Consider uploading reports for the commit ebbeb48 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #3313 +/- ##
==========================================
- Coverage 61.31% 61.03% -0.29%
==========================================
Files 72 72
Lines 3304 3313 +9
Branches 542 543 +1
==========================================
- Hits 2026 2022 -4
- Misses 1141 1152 +11
- Partials 137 139 +2
| Impacted Files | Coverage Δ | |
|---|---|---|
| autogpt/logs.py | 84.02% <100.00%> (+0.89%) |
: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.
FYI @Vwing
Tests fail @rob-luke
Tests fail @rob-luke
The tests started failing when you merged main. But I have fixed the issues. So this should be good for review @Pwuts @collijk @BillSchumacher
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.
I just fixed all the errors are #3436 was merged. Things should be good to review again @collijk
Thanks @Vwing and @merwanehamadi I’m keeping this updated with main. Is there anyone I should ping for another review/merge?
The failing test is unrelated to this change. I do not have access to restart the CI. When there is a push to main I will merge it in and that will restart the CI.
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
Thanks for the info @p-i- I read the wiki and suggest this Pr comes under point 1 and should be merged before reintegration
I [...] suggest this Pr comes under point 1 and should be merged before reintegration
I agree. This is a rather simple change but such a useful one. And while it's not as extensive as #3466, it solves the problem for most people for now. It may need to be revisited soonish to come up with a more generic implementation - but for now it's definitely candidate material to be considered for a review despite the ongoing re-arch effort.
Also, it's worth keeping in mind that this change is perfectly in line with all project recommendations to monitor API usage. So, definitely do consider this for integration now:
https://github.com/Significant-Gravitas/Auto-GPT#readme
Please note that the use of the GPT-4 language model can be expensive due to its token usage. By utilizing this project, you acknowledge that you are responsible for monitoring and managing your own token usage and the associated costs. It is highly recommended to check your OpenAI API usage regularly and set up any necessary limits or alerts to prevent unexpected charges.
it seems, there's a dedicated budget manager implementation in progress: #3919
Thanks for the info @Boostrix In that case I will close this PR. Thanks anyway @Vwing
Would not close it yet. Your patch looks straightforward and should work for many folks "as is" while the other stuff still is in the pipeline and might take a couple of weeks before it really arrives in the form of a functional feature