mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-02 19:55:18 +02:00
fix(notion): remove parent_page_id from create_notion_page tool signature
This commit is contained in:
parent
1d6c1a2287
commit
f0e1f3419e
1 changed files with 4 additions and 9 deletions
|
|
@ -34,7 +34,6 @@ def create_create_notion_page_tool(
|
||||||
async def create_notion_page(
|
async def create_notion_page(
|
||||||
title: str,
|
title: str,
|
||||||
content: str,
|
content: str,
|
||||||
parent_page_id: str | None = None,
|
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
"""Create a new page in Notion with the given title and content.
|
"""Create a new page in Notion with the given title and content.
|
||||||
|
|
||||||
|
|
@ -45,8 +44,6 @@ def create_create_notion_page_tool(
|
||||||
Args:
|
Args:
|
||||||
title: The title of the Notion page.
|
title: The title of the Notion page.
|
||||||
content: The markdown content for the page body (supports headings, lists, paragraphs).
|
content: The markdown content for the page body (supports headings, lists, paragraphs).
|
||||||
parent_page_id: Optional parent page ID to create as a subpage.
|
|
||||||
If not provided, will ask for one.
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Dictionary with:
|
Dictionary with:
|
||||||
|
|
@ -58,15 +55,13 @@ def create_create_notion_page_tool(
|
||||||
|
|
||||||
IMPORTANT: If status is "rejected", the user explicitly declined the action.
|
IMPORTANT: If status is "rejected", the user explicitly declined the action.
|
||||||
Respond with a brief acknowledgment (e.g., "Understood, I didn't create the page.")
|
Respond with a brief acknowledgment (e.g., "Understood, I didn't create the page.")
|
||||||
and move on. Do NOT ask for parent page IDs, troubleshoot, or suggest alternatives.
|
and move on. Do NOT troubleshoot or suggest alternatives.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
- "Create a Notion page titled 'Meeting Notes' with content 'Discussed project timeline'"
|
- "Create a Notion page titled 'Meeting Notes' with content 'Discussed project timeline'"
|
||||||
- "Save this to Notion with title 'Research Summary'"
|
- "Save this to Notion with title 'Research Summary'"
|
||||||
"""
|
"""
|
||||||
logger.info(
|
logger.info(f"create_notion_page called: title='{title}'")
|
||||||
f"create_notion_page called: title='{title}', parent_page_id={parent_page_id}"
|
|
||||||
)
|
|
||||||
|
|
||||||
if db_session is None or search_space_id is None or user_id is None:
|
if db_session is None or search_space_id is None or user_id is None:
|
||||||
logger.error(
|
logger.error(
|
||||||
|
|
@ -99,7 +94,7 @@ def create_create_notion_page_tool(
|
||||||
"params": {
|
"params": {
|
||||||
"title": title,
|
"title": title,
|
||||||
"content": content,
|
"content": content,
|
||||||
"parent_page_id": parent_page_id,
|
"parent_page_id": None,
|
||||||
"connector_id": connector_id,
|
"connector_id": connector_id,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -144,7 +139,7 @@ def create_create_notion_page_tool(
|
||||||
|
|
||||||
final_title = final_params.get("title", title)
|
final_title = final_params.get("title", title)
|
||||||
final_content = final_params.get("content", content)
|
final_content = final_params.get("content", content)
|
||||||
final_parent_page_id = final_params.get("parent_page_id", parent_page_id)
|
final_parent_page_id = final_params.get("parent_page_id")
|
||||||
final_connector_id = final_params.get("connector_id", connector_id)
|
final_connector_id = final_params.get("connector_id", connector_id)
|
||||||
|
|
||||||
if not final_title or not final_title.strip():
|
if not final_title or not final_title.strip():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue