From aacba555c92132ed4d781062614fe7d7b3d66657 Mon Sep 17 00:00:00 2001 From: Leon Luithlen Date: Wed, 27 Nov 2024 12:22:28 +0100 Subject: [PATCH] Remove passing of metadata_id to DocumentChunk --- cognee/modules/chunking/TextChunker.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cognee/modules/chunking/TextChunker.py b/cognee/modules/chunking/TextChunker.py index 24ed0b236..a98d36961 100644 --- a/cognee/modules/chunking/TextChunker.py +++ b/cognee/modules/chunking/TextChunker.py @@ -34,8 +34,7 @@ class TextChunker(): word_count = chunk_data["word_count"], is_part_of = self.document, chunk_index = self.chunk_index, - cut_type = chunk_data["cut_type"], - metadata_id = self.document.metadata_id + cut_type = chunk_data["cut_type"] ) paragraph_chunks = [] self.chunk_size = 0 @@ -48,8 +47,7 @@ class TextChunker(): word_count = self.chunk_size, is_part_of = self.document, chunk_index = self.chunk_index, - cut_type = paragraph_chunks[len(paragraph_chunks) - 1]["cut_type"], - metadata_id = self.document.metadata_id + cut_type = paragraph_chunks[len(paragraph_chunks) - 1]["cut_type"] ) except Exception as e: print(e) @@ -66,8 +64,7 @@ class TextChunker(): word_count = self.chunk_size, is_part_of = self.document, chunk_index = self.chunk_index, - cut_type = paragraph_chunks[len(paragraph_chunks) - 1]["cut_type"], - metadata_id = self.document.metadata_id + cut_type = paragraph_chunks[len(paragraph_chunks) - 1]["cut_type"] ) except Exception as e: print(e)