-
Notifications
You must be signed in to change notification settings - Fork 44.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
startup menu for ai_settings.yaml to support multiple configurations #4646
startup menu for ai_settings.yaml to support multiple configurations #4646
Conversation
- config\ai_config.py: added support for plugins + load_all, save and delete function - config\config.py: added set functions for plugins_allowlist and plugins_denylist - prompts\prompt.py: merged --manual functionality from setup.py and split construct_main_ai_config into separate functions for more reading and maintainability, to incorporate the new menu options and added color coding for better user experience. - setup.py: removed --manual function and added save feature to save the automatically created configuration - main.py: added cfg.ai_settings_filepath to eliminate using SAVE_FILE and changed to call start_prompt function instead of construct_main_ai_config, also added a new function (start_agent_directly) for the user to be able to start an agent directly from the menu after editing.
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR. |
- added more consistency across functions: to utilize the same prompt structure - fixed [R]eturn prompt: handle_config function - added and shortened comments for several functions
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR. |
- added better pytests to cover more code - fixed exceptions ai_config class for existing (but empty) yaml file - added: configuration saved log for generate_aiconfig_automatic in setup.py
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR. |
recorded test cassettes
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 pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
same, thanks for nothing |
@bassie661 the PR has had no activity since June 2023 and looked stale. Apologies, I've reopened. Have you tested this with the latest version of AutoGPT? I'll close again if there has been no activity in 2 weeks. |
PR Description updated to latest commit (b077bce)
|
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
@bassie661 are you planning on picking this up again? |
Nope sorry.
Greets Rob
…________________________________
Van: Swifty ***@***.***>
Verzonden: vrijdag 5 juli 2024 10:21
Aan: Significant-Gravitas/AutoGPT ***@***.***>
CC: Rob Jonas ***@***.***>; Mention ***@***.***>
Onderwerp: Re: [Significant-Gravitas/AutoGPT] startup menu for ai_settings.yaml to support multiple configurations (PR #4646)
@bassie661<https://github.com/bassie661> are you planning on picking this up again?
—
Reply to this email directly, view it on GitHub<#4646 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQLKIYGPECZPNTTU7JSTUODZKZJQLAVCNFSM6AAAAABKBWDWOOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJQGQZDGMRSGI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Okay no worries, closing now then. |
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
-> e.g. ai_name, ai_role, ai_goals[], api_budget, plugins
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.
Test Plan
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
Changes walkthrough 📝
5 files
ai_config.py
Support for multiple AI configurations with plugins
autogpt/config/ai_config.py
configurations.
config.py
Added plugin management and ai_settings_filepath
autogpt/config/config.py
main.py
Main entry point modifications for configuration management
autogpt/main.py
prompt.py
Refactored prompt handling and configuration management
autogpt/prompts/prompt.py
setup.py
Integrated automatic configuration with new menu system
autogpt/setup.py
4 files
test_setup.py
Integration tests for configuration management
tests/integration/test_setup.py
configurations.
test_ai_config.py
Unit tests for AIConfig class
tests/unit/test_ai_config.py
test_config.py
Unit tests for plugin management in Config class
tests/unit/test_config.py
test_prompt.py
Unit tests for prompt handling functions
tests/unit/test_prompt.py