diff options
author | Nicholas Tindle <nicholas.tindle@agpt.co> | 2024-05-01 07:06:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-01 07:06:36 -0500 |
commit | 2af3724e04c355b4130c8f62b0ad2263a5e2c086 (patch) | |
tree | 5446e5a9d9a8326bb74e5e8f54ca9ee6b141e2d1 | |
parent | Merge branch 'master' into forge/fixes (diff) | |
parent | fix(agent): Fix `execute_python_file` on local storage (diff) | |
download | Auto-GPT-2af3724e04c355b4130c8f62b0ad2263a5e2c086.tar.gz Auto-GPT-2af3724e04c355b4130c8f62b0ad2263a5e2c086.tar.bz2 Auto-GPT-2af3724e04c355b4130c8f62b0ad2263a5e2c086.zip |
Merge branch 'master' into forge/fixes
-rw-r--r-- | autogpts/autogpt/autogpt/commands/execute_code.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/autogpts/autogpt/autogpt/commands/execute_code.py b/autogpts/autogpt/autogpt/commands/execute_code.py index b9365b2c2..515f2d60b 100644 --- a/autogpts/autogpt/autogpt/commands/execute_code.py +++ b/autogpts/autogpt/autogpt/commands/execute_code.py @@ -164,8 +164,8 @@ class CodeExecutorComponent(CommandProvider): if not str(filename).endswith(".py"): raise InvalidArgumentError("Invalid file type. Only .py files are allowed.") - file_path = Path(filename) - if not file_path.is_file(): + file_path = self.workspace.get_path(filename) + if not self.workspace.exists(file_path): # Mimic the response that you get from the command line to make it # intuitively understandable for the LLM raise FileNotFoundError( |