Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Enabling/disabling none/all of plugins from .env file (#4036)

Trajan Wiley-Jimenezccc03c1a8dac
diff --git a/autogpt/plugins.py b/autogpt/plugins.py
index 99bb6256b4..bf77ef748c 100644
--- a/autogpt/plugins.py
+++ b/autogpt/plugins.py
@@ -262,10 +262,14 @@ def denylist_allowlist_check(plugin_name: str, cfg: Config) -> bool:
True or False
"""
logger.debug(f"Checking if plugin {plugin_name} should be loaded")
- if plugin_name in cfg.plugins_denylist:
+ if (
+ plugin_name in cfg.plugins_denylist
+ or "all" in cfg.plugins_denylist
+ or "none" in cfg.plugins_allowlist
+ ):
logger.debug(f"Not loading plugin {plugin_name} as it was in the denylist.")
return False
- if plugin_name in cfg.plugins_allowlist:
+ if plugin_name in cfg.plugins_allowlist or "all" in cfg.plugins_allowlist:
logger.debug(f"Loading plugin {plugin_name} as it was in the allowlist.")
return True
ack = input(