Skip to content

Commit

Permalink
Changing chunk sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyabnazari committed Jul 5, 2023
1 parent 1a204e8 commit 0ee123d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ def text_to_docs(text: List[str], metadata: Dict[str, str]) -> List[Document]:
all_chunks = []
for page_num, page in text:
text_splitter = RecursiveCharacterTextSplitter(
chunk_size=500,
chunk_size=3500,
separators=["\n\n", "\n", ".", "!", "?", ",", " ", ""],
chunk_overlap=100,
chunk_overlap=500,
)
chunks = text_splitter.split_text(page)
all_chunks.extend([(page_num, i, chunk) for i, chunk in enumerate(chunks)])
Expand Down

0 comments on commit 0ee123d

Please sign in to comment.