-
Notifications
You must be signed in to change notification settings - Fork 44.5k
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
Optimizing Responsibilities of Class Objects #2367
Optimizing Responsibilities of Class Objects #2367
Conversation
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. |
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. |
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. |
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
The PR I optimized two days ago has conflicts again. However, it is still possible to perform the following optimizations: b. command_registry belongs to AIConfig and PromptGenerator, which can be optimized. AI Config would be better with only user input data. c. There are two command lists, d. There are two command objects. e. PromptGenerator commands is list , dict will be better, query is faster. f. Now there are many files involved in optimization, such as generator.py, prompt.py, ai_config.py, agent.py, app.py, cli.py My changes will conflicts. If it is possible for me to optimize it, just let me know. |
This is a mass message from the AutoGPT core team. For more details (and for infor on joining our Discord), please refer to: |
Thanks for submitting, this kind of clean-up is appreciated! A lot of similar work has been done since this PR was submitted, which has caused extensive conflicts with I'll close this pull request, although we would be happy to keep you involved. Feel free to submit pull requests again or bring existing ones to our attention. We are working to get to a balance between our capacity to process PRs and the rate at which we receive them. |
Background
1. AIConfig and Prompt two classes has interdependence.
The construct_prompt function in prompt.py is to call the construct_full_prompt function of the AlConfig object,
And the construct_full_prompt function needs to call the get_prompt function in prompt.py.
2. variable assignment
I saw the code in the script of cli.py (called main.py yesterday), as follows:
Where is the value of the ai_name variable obtained, it cannot be seen here.
So need Optimizing Responsibilities of Class Objects.
Changes
Optimizing Responsibilities of Class Objects:
AIConfig only config, not generate prompt.
Prompt is responsible generate prompt.
Setup script is responsible to get AIConfig (either from user input or from ai_settings_file).
Documentation
Test Plan
PR Quality Checklist