AutoGPT
AutoGPT copied to clipboard
startup menu for ai_settings.yaml to support multiple configurations
User description
Summary
I created this PR to add support for storing multiple configurations, thus allowing the user to 'create', 'edit', 'view' or 'delete' configurations and have their settings stored in ai_settings.yaml. The ai_settings file now saves configurations as dictionary and if a configuration exists it is showed as a menu option when autogpt is started.
When no configurations are found, or no ai_settings.yaml file, the user get's the usual generate_aiconfig_automatic questions and can choose to either let autogpt create the config from a single input or the user can choose "--manual" to manually input the first configuration. At the end of this process the first configuration is saved in the ai_settings file.
Next time when autogpt starts and/or when configurations are found in ai_settings.yaml, the prompt starts-up with the following menu:
Change
- Support storing multiple AI configurations
- Support choose existing AI configuration(s)
- Support create new AI configuration(s)
- Support edit existing AI configuration(s)
- Support view existing AI configuration(s)
- Support delete existing AI configuration(s) -> e.g. ai_name, ai_role, ai_goals[], api_budget, plugins
- Support for plugins per AI configuration (add, delete, change), plugins are expected to land with #4089
This PR is big but it was needed to restructure the old and add the new functionality to the '--manual' startup flow while keeping the functionality clear and maintainable.
- Initial plan was to also add support for setting temperature (ai_temp) per AI configuration (add, delete, change) but this clearly needs extra changes, so a separate PR for ai_temp support is needed.
- This is a new approach which rendered #3711 and #4478 obsolete.
- I had to rewrite a lot of parts to keep up with the commits and release of v0.4.0 / v0.4.1 and v0.4.2
- added support for #4666
Test Plan
- integration\test_setup.py
- unit\test_ai_config.py
- unit\test_config.py
- unit\test_prompt.py
PR Quality Checklist
[x] My pull request is atomic and focuses on a single change. -> mostly true but reworking the old startup prompts was quite complex which inevitably needed more than 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. [x] I have run the following commands against my code to ensure it passes our linters: black . / isort . / mypy autoflake --remove-all-unused-imports --recursive --ignore-init-module-imports autogpt tests --in-place
PR Type
Enhancement, Tests
Description
- Added support for storing and managing multiple AI configurations, including plugins.
- Refactored prompt handling to introduce a new interactive menu for configuration management.
- Integrated automatic configuration generation with the new menu system.
- Added comprehensive unit and integration tests for the new features.
Changes walkthrough 📝
| Relevant files | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Enhancement | 5 files
| ||||||||||
| Tests | 4 files
|
💡 PR-Agent usage: Comment
/helpon the PR to get a list of all available PR-Agent tools and their descriptions
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docs | ⬜️ Ignored (Inspect) | Jun 12, 2023 5:16pm |
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
Codecov Report
Attention: Patch coverage is 74.27293% with 115 lines in your changes missing coverage. Please review.
Project coverage is 71.47%. Comparing base (
32038c9) to head (b077bce). Report is 3196 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #4646 +/- ##
==========================================
+ Coverage 70.63% 71.47% +0.83%
==========================================
Files 67 68 +1
Lines 3239 3667 +428
Branches 514 606 +92
==========================================
+ Hits 2288 2621 +333
- Misses 783 848 +65
- Partials 168 198 +30
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Deploy Preview for auto-gpt-docs failed.
| Name | Link |
|---|---|
| Latest commit | b077bcefdfa18d0d167202b574f96e6299cd49b9 |
| Latest deploy log | https://app.netlify.com/sites/auto-gpt-docs/deploys/64969959f04b3700089bab96 |
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.