Skip to content

Commit

Permalink
[community] [Bugfix] base_o365 document loader metadata needs to be J…
Browse files Browse the repository at this point in the history
…SON serializable (#26322)

In order for indexer to work, all metadata in the documents need to be
JSON serializable. Timestamps are not.

See here:

https://github.com/langchain-ai/langchain/blob/master/libs/core/langchain_core/indexing/api.py#L83-L89

@eyurtsev could you please review? It's a tiny PR :-)
  • Loading branch information
MacanPN authored Oct 14, 2024
1 parent de62d02 commit 8dc4bec
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def _load_from_folder(self, folder: Folder) -> Iterable[Blob]:
metadata_dict[file.name] = {
"source": file.web_url,
"mime_type": file.mime_type,
"created": file.created,
"modified": file.modified,
"created": str(file.created),
"modified": str(file.modified),
"created_by": str(file.created_by),
"modified_by": str(file.modified_by),
"description": file.description,
Expand Down

0 comments on commit 8dc4bec

Please sign in to comment.