diff --git a/backend/modules/parsers/unstructured_io.py b/backend/modules/parsers/unstructured_io.py index cbbd9bf2..b559c1ac 100644 --- a/backend/modules/parsers/unstructured_io.py +++ b/backend/modules/parsers/unstructured_io.py @@ -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