From 6721eaee83aac51594cee2202d1c3a8957b5463d Mon Sep 17 00:00:00 2001 From: Leon Luithlen Date: Thu, 14 Nov 2024 13:50:40 +0100 Subject: [PATCH] Fix chunk_index bug in chunk_by_paragraph --- cognee/tasks/chunks/chunk_by_paragraph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cognee/tasks/chunks/chunk_by_paragraph.py b/cognee/tasks/chunks/chunk_by_paragraph.py index f960eb028..276da0bf1 100644 --- a/cognee/tasks/chunks/chunk_by_paragraph.py +++ b/cognee/tasks/chunks/chunk_by_paragraph.py @@ -53,9 +53,9 @@ def chunk_by_paragraph(data: str, paragraph_length: int = 1024, batch_paragraphs "cut_type": end_type } yield chunk_dict + chunk_index += 1 current_chunk = "" current_word_count = 0 - chunk_index = 0 last_cut_type = end_type last_paragraph_id = paragraph_id