Skip to content

Commit

Permalink
Add source metadata to OutlookMessageLoader (#11183)
Browse files Browse the repository at this point in the history
Description: Add "source" metadata to OutlookMessageLoader

This pull request adds the "source" metadata to the OutlookMessageLoader
class in the load method. The "source" metadata is required when
indexing with RecordManager in order to sync the index documents with a
source.

Issue: None

Dependencies: None

Twitter handle: @ATelders

Co-authored-by: Arthur Telders <arthur.telders@roquette.com>
  • Loading branch information
ATelders and Arthur Telders authored Sep 28, 2023
1 parent ff90bb5 commit 0da484b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libs/langchain/langchain/document_loaders/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def load(self) -> List[Document]:
Document(
page_content=msg.body,
metadata={
"source": self.file_path,
"subject": msg.subject,
"sender": msg.sender,
"date": msg.date,
Expand Down

0 comments on commit 0da484b

Please sign in to comment.