diff --git a/agbenchmark/benchmarks.py b/agbenchmark/benchmarks.py index ff8ab877..bf5ff256 100644 --- a/agbenchmark/benchmarks.py +++ b/agbenchmark/benchmarks.py @@ -25,6 +25,7 @@ def bootstrap_agent(task: str, continuous_mode: bool) -> Agent: config.debug_mode = True config.continuous_mode = continuous_mode config.temperature = 0 + config.noninteractive_mode = True config.plain_output = True config.memory_backend = "no_memory" config.workspace_path = Workspace.init_workspace_directory(config) diff --git a/autogpt/commands/user_interaction.py b/autogpt/commands/user_interaction.py index d5fa38db..484150fb 100644 --- a/autogpt/commands/user_interaction.py +++ b/autogpt/commands/user_interaction.py @@ -23,6 +23,7 @@ from autogpt.command_decorator import command "required": True, } }, + enabled=lambda config: not config.noninteractive_mode ) def ask_user(question: str, agent: Agent) -> str: resp = clean_input(agent.config, f"{agent.ai_config.ai_name} asks: '{question}': ") diff --git a/autogpt/config/config.py b/autogpt/config/config.py index 93fc42e9..f47c22c3 100644 --- a/autogpt/config/config.py +++ b/autogpt/config/config.py @@ -37,6 +37,7 @@ class Config(SystemSettings, arbitrary_types_allowed=True): exit_key: str = "n" debug_mode: bool = False plain_output: bool = False + noninteractive_mode: bool = False chat_messages_enabled: bool = True # TTS configuration speak_mode: bool = False diff --git a/tests/conftest.py b/tests/conftest.py index 55a1a4e3..0631ee50 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -57,6 +57,7 @@ def config( config.plugins_dir = "tests/unit/data/test_plugins" config.plugins_config_file = temp_plugins_config_file + config.noninteractive_mode = True config.plain_output = True # avoid circular dependency