From fac15c93e99f4d98eec82be547870398115859a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8E=E1=85=AC=E1=84=8C=E1=85=A2=E1=84=92=E1=85=A7?= =?UTF-8?q?=E1=86=A8?= <86944451+choijhyeok@users.noreply.github.com> Date: Wed, 14 Jan 2026 19:09:23 +0900 Subject: [PATCH] =?UTF-8?q?NotionUploader=EC=97=90=20'reasoning=5Fannotati?= =?UTF-8?q?on'=20=EB=B0=8F=20'context'=20=EC=86=8D=EC=84=B1=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- generate_synthetic_table/notion_uploader.py | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/generate_synthetic_table/notion_uploader.py b/generate_synthetic_table/notion_uploader.py index f7390d1..90bdafd 100644 --- a/generate_synthetic_table/notion_uploader.py +++ b/generate_synthetic_table/notion_uploader.py @@ -151,6 +151,12 @@ def _ensure_database_properties(self, database_id: str) -> str: if "Provider" not in db_properties: properties_to_add["Provider"] = {"select": {}} + if "reasoning_annotation" not in db_properties: + properties_to_add["reasoning_annotation"] = {"rich_text": {}} + + if "context" not in db_properties: + properties_to_add["context"] = {"rich_text": {}} + if properties_to_add: print(f" 📝 Adding missing properties: {list(properties_to_add.keys())}") self.client.databases.update( @@ -231,6 +237,8 @@ def build_property_value(prop_name: str, value: str, preferred_type: str = "sele question = qa.get("question", qa.get("Q", "")) answer = qa.get("answer", qa.get("A", "")) qa_type = qa.get("type", "unknown") + reasoning_annotation = qa.get("reasoning_annotation", "") + context = qa.get("context", "") # Build page properties for this QA properties = { @@ -283,6 +291,24 @@ def build_property_value(prop_name: str, value: str, preferred_type: str = "sele "number": tokens_per_qa }, "Provider": build_property_value("Provider", provider, "select"), + "reasoning_annotation": { + "rich_text": [ + { + "text": { + "content": reasoning_annotation[:2000] if reasoning_annotation else "" + } + } + ] + }, + "context": { + "rich_text": [ + { + "text": { + "content": context[:2000] if context else "" + } + } + ] + }, } # Create the page (row)