From 3b5e8bacfa6d5b7c223cb93f09c6c21d39542b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=B9=E5=86=85=E8=AC=99=E5=A4=AA?= <49678973+kenta-takeuchi@users.noreply.github.com> Date: Wed, 15 Nov 2023 13:31:12 +0900 Subject: [PATCH] FEAT Add some properties to NotionDBLoader (#13358) fix #13356 Add supports following properties for metadata to NotionDBLoader. - `checkbox` - `email` - `number` - `select` There are no relevant tests for this code to be updated. --- libs/langchain/langchain/document_loaders/notiondb.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/langchain/langchain/document_loaders/notiondb.py b/libs/langchain/langchain/document_loaders/notiondb.py index d7728efcc8..e24d6fe555 100644 --- a/libs/langchain/langchain/document_loaders/notiondb.py +++ b/libs/langchain/langchain/document_loaders/notiondb.py @@ -130,6 +130,14 @@ class NotionDBLoader(BaseLoader): ) elif prop_type == "created_time": value = prop_data["created_time"] if prop_data["created_time"] else None + elif prop_type == "checkbox": + value = prop_data["checkbox"] + elif prop_type == "email": + value = prop_data["email"] + elif prop_type == "number": + value = prop_data["number"] + elif prop_type == "select": + value = prop_data["select"]["name"] if prop_data["select"] else None else: value = None