mirror of
https://github.com/hwchase17/langchain
synced 2024-11-04 06:00:26 +00:00
add 3 property types in metadata for notiondb loader (#8509)
### Description: NotionDB supports a number of common property types. I have found three common types that are not included in notiondb loader. When programs loaded them with notiondb, which will cause some metadata information not to be passed to langchain. Therefore, I added three common types: - date - created_time - last_edit_time. ### Issue: no ### Dependencies: No dependencies added :) ### Tag maintainer: @rlancemartin, @eyurtsev ### Twitter handle: @BJTUTC
This commit is contained in:
parent
258d67b0ac
commit
b87cc8b31e
@ -120,6 +120,12 @@ class NotionDBLoader(BaseLoader):
|
|||||||
if prop_data["people"]
|
if prop_data["people"]
|
||||||
else []
|
else []
|
||||||
)
|
)
|
||||||
|
elif prop_type == "date":
|
||||||
|
value = prop_data["date"]
|
||||||
|
elif prop_type == "created_time":
|
||||||
|
value = prop_data["created_time"]
|
||||||
|
elif prop_type == "last_edited_time":
|
||||||
|
value = prop_data["last_edited_time"]
|
||||||
else:
|
else:
|
||||||
value = None
|
value = None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user