Skip to content

Commit

Permalink
Disable ask_user for testing or benchmarking runs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwuts committed Aug 24, 2023
1 parent 4bcb39d commit 055bbc1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions agbenchmark/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions autogpt/commands/user_interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"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}': ")
Expand Down
1 change: 1 addition & 0 deletions autogpt/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 055bbc1

Please sign in to comment.