AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Merge branch 'master' into fix/type-annotations
Jayce Slesar713e4c1822e7
diff --cc autogpt/commands/file_operations.pyindex 2911d60175,7ce90a3815..8abc2e2329--- a/autogpt/commands/file_operations.py+++ b/autogpt/commands/file_operations.py@@@ -1,21 -1,11 +1,14 @@@"""File operations for AutoGPT"""+from __future__ import annotations+import osimport os.path+from pathlib import Path+from typing import Generator-- # Set a dedicated folder for file I/O- WORKING_DIRECTORY = Path(os.getcwd()) / "auto_gpt_workspace"-- # Create the directory if it doesn't exist- if not os.path.exists(WORKING_DIRECTORY):- os.makedirs(WORKING_DIRECTORY)+ from autogpt.workspace import path_in_workspace, WORKSPACE_PATH-from typing import Generator, ListLOG_FILE = "file_logger.txt"- LOG_FILE_PATH = WORKING_DIRECTORY / LOG_FILE- WORKING_DIRECTORY = str(WORKING_DIRECTORY)+ LOG_FILE_PATH = WORKSPACE_PATH / LOG_FILEdef check_duplicate_operation(operation: str, filename: str) -> bool: