summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rag/parser/pdf.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rag/parser/pdf.py b/rag/parser/pdf.py
index a5e4665..1680a47 100644
--- a/rag/parser/pdf.py
+++ b/rag/parser/pdf.py
@@ -8,7 +8,8 @@ from langchain_community.document_loaders import PyPDFLoader
def parser(filepath: Path):
content = PyPDFLoader(filepath).load()
splitter = RecursiveCharacterTextSplitter(
- chunk_size=os.environ["CHUNK_SIZE"], chunk_overlap=os.environ["CHUNK_OVERLAP"]
+ chunk_size=int(os.environ["CHUNK_SIZE"]),
+ chunk_overlap=int(os.environ["CHUNK_OVERLAP"]),
)
chunks = splitter.split_documents(content)
return chunks