diff --git a/memgpt/utils.py b/memgpt/utils.py index e2146bc7..860a459f 100644 --- a/memgpt/utils.py +++ b/memgpt/utils.py @@ -152,6 +152,10 @@ def total_bytes(pattern): def chunk_file(file, tkns_per_chunk=300, model="gpt-4"): encoding = tiktoken.encoding_for_model(model) + + if file.endswith(".db"): + return # can't read the sqlite db this way, will get handled in main.py + with open(file, "r") as f: if file.endswith(".pdf"): lines = [l for l in read_pdf_in_chunks(file, tkns_per_chunk * 8)]