aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Krzysztof Czerwinski <34861343+kcze@users.noreply.github.com> 2024-03-18 20:09:56 +0100
committerGravatar GitHub <noreply@github.com> 2024-03-18 20:09:56 +0100
commite201f57861164740762362093a2166b34d6cbc77 (patch)
tree6431ef20732ea37ee35a2e568820e2993c23d81d
parentfeat(autogpt/cli): Check if port is available before running server (#6996) (diff)
downloadAuto-GPT-e201f57861164740762362093a2166b34d6cbc77.tar.gz
Auto-GPT-e201f57861164740762362093a2166b34d6cbc77.tar.bz2
Auto-GPT-e201f57861164740762362093a2166b34d6cbc77.zip
feat(autogpt/cli): Display info if code execution is enabled (#6997)
Display if code execution is enabled or not on CLI startup, depending if Docker is available.
-rw-r--r--autogpts/autogpt/autogpt/app/main.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/autogpts/autogpt/autogpt/app/main.py b/autogpts/autogpt/autogpt/app/main.py
index 59ea781a5..39524ee70 100644
--- a/autogpts/autogpt/autogpt/app/main.py
+++ b/autogpts/autogpt/autogpt/app/main.py
@@ -24,6 +24,10 @@ from autogpt.agent_factory.profile_generator import generate_agent_profile_for_t
from autogpt.agent_manager import AgentManager
from autogpt.agents import AgentThoughts, CommandArgs, CommandName
from autogpt.agents.utils.exceptions import AgentTerminated, InvalidAgentResponseError
+from autogpt.commands.execute_code import (
+ is_docker_available,
+ we_are_running_in_a_docker_container,
+)
from autogpt.commands.system import finish
from autogpt.config import (
AIDirectives,
@@ -152,6 +156,14 @@ async def run_auto_gpt(
print_attribute("Using Prompt Settings File", prompt_settings)
if config.allow_downloads:
print_attribute("Native Downloading", "ENABLED")
+ if we_are_running_in_a_docker_container() or is_docker_available():
+ print_attribute("Code Execution", "ENABLED")
+ else:
+ print_attribute(
+ "Code Execution",
+ "DISABLED (Docker unavailable)",
+ title_color=Fore.YELLOW,
+ )
if install_plugin_deps:
install_plugin_dependencies()