Skip to content

Commit

Permalink
MathPix: Include PDF ID in metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Chad Norvell committed Jan 6, 2024
1 parent d136925 commit ec317ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/community/langchain_community/document_loaders/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def load(self) -> List[Document]:
contents = self.get_processed_pdf(pdf_id)
if self.should_clean_pdf:
contents = self.clean_pdf(contents)
metadata = {"source": self.source, "file_path": self.source}
metadata = {"source": self.source, "file_path": self.source, "pdf_id": pdf_id}
return [Document(page_content=contents, metadata=metadata)]


Expand Down

0 comments on commit ec317ab

Please sign in to comment.