Skip to content

Commit

Permalink
fix: getting empty chunks in semantic splitter (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
elisalimli committed Mar 7, 2024
1 parent 1fbc8ab commit ea5e041
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions service/splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ def _append_chunks(
# TODO: Think of how to pass this to LLM
metadata={"table_content": table, **metadata},
)
else:
accumulated_element_texts.append(element.get("text"))

# Process any remaining accumulated text after the last table
# or if no table was encountered
Expand Down

0 comments on commit ea5e041

Please sign in to comment.