Skip to content

Commit

Permalink
Merge pull request #408 from truefoundry/S1LV3RJ1NX-patch-1
Browse files Browse the repository at this point in the history
Update unstructured_io.py for empty text
  • Loading branch information
mnvsk97 authored Nov 11, 2024
2 parents 2522503 + c860df4 commit 0c447a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/modules/parsers/unstructured_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ async def get_chunks(self, filepath: str, metadata: dict, **kwargs):
parsed_data = response.json()
for payload in parsed_data:
text = payload["text"]
if not text:
continue
metadata = payload["metadata"]
final_texts.append(Document(page_content=text, metadata=metadata))
return final_texts
Expand Down

0 comments on commit 0c447a7

Please sign in to comment.