Skip to content

Commit

Permalink
feat(autogpt/cli): Display info if code execution is enabled (Signifi…
Browse files Browse the repository at this point in the history
…cant-Gravitas#6997)

Display if code execution is enabled or not on CLI startup, depending if Docker is available.
  • Loading branch information
kcze authored Mar 18, 2024
1 parent fea62a7 commit e201f57
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions autogpts/autogpt/autogpt/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
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,
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit e201f57

Please sign in to comment.