-
Notifications
You must be signed in to change notification settings - Fork 45.1k
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
Rework plugin config to be file-based #4673
Rework plugin config to be file-based #4673
Conversation
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR. |
✅ Deploy Preview for auto-gpt-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
c215af9
to
9c11007
Compare
This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR. |
4a3e682
to
8bf8764
Compare
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. |
8bf8764
to
0da03cf
Compare
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
You changed AutoGPT's behaviour. The cassettes have been updated and will be merged to the submodule when this Pull Request gets merged. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #4673 +/- ##
==========================================
+ Coverage 70.43% 70.77% +0.33%
==========================================
Files 70 72 +2
Lines 3437 3504 +67
Branches 547 556 +9
==========================================
+ Hits 2421 2480 +59
- Misses 848 856 +8
Partials 168 168
☔ View full report in Codecov by Sentry. |
Background
Currently the way to configure which plugins to use is to change
ALLOWLISTED_PLUGINS
/DENYLISTED_PLUGINS
in .env.The only way to configure a plugin is through the same .env file.
This change adds a plugin config file,
plugins_config.yaml
which allows plugins to be enabled and disabled (replacing the old allowlist/denylist). It also allows arbitrary config per plugin, such as API keys or model names or whatever that plugin needs. Now, plugins don't need their own env variables.I made significant effort for this to be backwards-compatible. On start-up, if the plugins settings file isn't found, it will create a config file derived on the old
ALLOWLISTED_PLUGINS
/DENYLISTED_PLUGINS
env variables.Configuration for old plugins won't need to be changed immediately, they can still use whatever env variables they wanted. The plugin author can decide whether to use env variables or the plugins config file. We should encourage using the plugins config file, though.
Changes
enabled
valueDocumentation
options.md
with new/removed varsplugins.md
with the config file detailsTest Plan
PR Quality Checklist