Skip to content

Commit ea5e041

Browse files
authored
fix: getting empty chunks in semantic splitter (#85)
1 parent 1fbc8ab commit ea5e041

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

service/splitter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ def _append_chunks(
188188
# TODO: Think of how to pass this to LLM
189189
metadata={"table_content": table, **metadata},
190190
)
191+
else:
192+
accumulated_element_texts.append(element.get("text"))
191193

192194
# Process any remaining accumulated text after the last table
193195
# or if no table was encountered

0 commit comments

Comments
 (0)