Skip to content

Commit

Permalink
[bug] list_files api signature change in data_ingestion.py and lo… (
Browse files Browse the repository at this point in the history
  • Loading branch information
valayDave authored May 1, 2023
1 parent c317cf0 commit 6ae90a3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions data_ingestion.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import argparse
import logging

from autogpt.commands.file_operations import ingest_file, search_files
from autogpt.commands.file_operations import ingest_file, list_files
from autogpt.config import Config
from autogpt.memory import get_memory

Expand All @@ -10,12 +10,11 @@

def configure_logging():
logging.basicConfig(
filemode="a",
format="%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s",
datefmt="%H:%M:%S",
level=logging.DEBUG,
handlers=[
logging.FileHandler(filename="log-ingestion.txt"),
logging.FileHandler(filename="log-ingestion.txt", mode="a"),
logging.StreamHandler(),
],
)
Expand All @@ -31,7 +30,7 @@ def ingest_directory(directory, memory, args):
"""
global logger
try:
files = search_files(directory)
files = list_files(directory)
for file in files:
ingest_file(file, memory, args.max_length, args.overlap)
except Exception as e:
Expand Down Expand Up @@ -68,7 +67,6 @@ def main() -> None:
help="The max_length of each chunk when ingesting files (default: 4000)",
default=4000,
)

args = parser.parse_args()

# Initialize memory
Expand Down

0 comments on commit 6ae90a3

Please sign in to comment.