Skip to content

Commit a6da124

Browse files
committed
change extend to append to prevent newline bug on chunk_by_document
1 parent 72288b1 commit a6da124

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

thepipe/chunker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def chunk_by_document(chunks: List[Chunk]) -> List[Chunk]:
3737
doc_texts = []
3838
doc_images = []
3939
for chunk in doc_chunks:
40-
doc_texts.extend(chunk.text)
40+
doc_texts.append(chunk.text)
4141
doc_images.extend(chunk.images)
4242
text = "\n".join(doc_texts) if doc_texts else None
4343
new_chunks.append(Chunk(path=doc_chunks[0].path, text=text, images=doc_images))

0 commit comments

Comments
 (0)