Skip to content

Commit

Permalink
Update haystack_experimental/components/extractors/llm_metadata_extra…
Browse files Browse the repository at this point in the history
…ctor.py

Co-authored-by: Sebastian Husch Lee <[email protected]>
  • Loading branch information
davidsbatista and sjrl authored Oct 31, 2024
1 parent a486008 commit ae9d758
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def run(self, documents: List[Document], page_range: Optional[List[Union[str, in

splitter = DocumentSplitter(split_by="page", split_length=1)
pages = splitter.run(documents=[document])
content = [p.content + "\n" for idx, p in enumerate(pages["documents"]) if idx in self.expanded_range]
content = [p.content + "\f" for idx, p in enumerate(pages["documents"]) if (idx + 1) in self.expanded_range]

self._extract_metadata_and_update_doc(document, errors, "".join(content))

Expand Down

0 comments on commit ae9d758

Please sign in to comment.