Skip to content

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.

Update file_operations.py

Maiko Bossuyt4465486ea39b
diff --git a/scripts/file_operations.py b/scripts/file_operations.py
index 8e807bba32..e664fcc91d 100644
--- a/scripts/file_operations.py
+++ b/scripts/file_operations.py
@@ -86,21 +86,6 @@ def ingest_file(filename, memory, max_length=4000, overlap=200):
print(f"Error while ingesting file '{filename}': {str(e)}")
-def ingest_directory(directory, memory):
- """
- Ingest all files in a directory by calling the ingest_file function for each file.
-
- :param directory: The directory containing the files to ingest
- :param memory: An object with an add() method to store the chunks in memory
- """
- try:
- files = search_files(directory)
- for file in files:
- ingest_file(file, memory)
- except Exception as e:
- print(f"Error while ingesting directory '{directory}': {str(e)}")
-
-
def write_to_file(filename, text):
"""Write text to a file"""
try: