From fb4a1d3f54316e91e77d2a152e337f11fc641688 Mon Sep 17 00:00:00 2001 From: Sohrab Saran Date: Mon, 17 Jul 2023 23:54:47 +0530 Subject: [PATCH 1/2] Fix `execute_python_file` workspace mount & Windows path formatting (#4996) * fix for #4975 * Add TODO based on code comment. * Use builtin `Path.as_posix()` * Remove TODO --------- Co-authored-by: Reinier van der Leer Signed-off-by: Merwane Hamadi --- autogpt/commands/execute_code.py | 7 +++++-- prompt_settings.yaml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/autogpt/commands/execute_code.py b/autogpt/commands/execute_code.py index 2403b2ba5d34..fb4cb70ea602 100644 --- a/autogpt/commands/execute_code.py +++ b/autogpt/commands/execute_code.py @@ -145,11 +145,14 @@ def execute_python_file(filename: str, agent: Agent) -> str: logger.debug(f"Running {file_path} in a {image_name} container...") container: DockerContainer = client.containers.run( image_name, - ["python", str(file_path.relative_to(agent.workspace.root))], + [ + "python", + file_path.relative_to(agent.workspace.root).as_posix(), + ], volumes={ agent.config.workspace_path: { "bind": "/workspace", - "mode": "ro", + "mode": "rw", } }, working_dir="/workspace", diff --git a/prompt_settings.yaml b/prompt_settings.yaml index 342d67b9ebb0..007b2016e52d 100644 --- a/prompt_settings.yaml +++ b/prompt_settings.yaml @@ -2,7 +2,7 @@ constraints: [ '~4000 word limit for short term memory. Your short term memory is short, so immediately save important information to files.', 'If you are unsure how you previously did something or want to recall past events, thinking about similar events will help you remember.', 'No user assistance', - 'Exclusively use the commands listed below e.g. command_name' + 'Exclusively use the commands listed below e.g. command_name!' ] resources: [ 'Internet access for searches and information gathering.', From 04d53e94ad2fe83473302bdeb856a49ac3cec6e0 Mon Sep 17 00:00:00 2001 From: Merwane Hamadi Date: Tue, 18 Jul 2023 13:22:10 -0700 Subject: [PATCH 2/2] Push reports to google drive Signed-off-by: Merwane Hamadi --- prompt_settings.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prompt_settings.yaml b/prompt_settings.yaml index 007b2016e52d..2ca02e045311 100644 --- a/prompt_settings.yaml +++ b/prompt_settings.yaml @@ -13,5 +13,5 @@ performance_evaluations: [ 'Continuously review and analyze your actions to ensure you are performing to the best of your abilities.', 'Constructively self-criticize your big-picture behavior constantly.', 'Reflect on past decisions and strategies to refine your approach.', - 'Every command has a cost, so be smart and efficient. Aim to complete tasks in the least number of steps.' + 'Every command has a cost, so be smart and efficient. Aim to complete tasks in the least number of steps!' ]