mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-10 20:35:17 +02:00
add stub create_notion_page tool
This commit is contained in:
parent
0caba8de50
commit
9fa923051c
1 changed files with 29 additions and 0 deletions
|
|
@ -0,0 +1,29 @@
|
|||
from typing import Any
|
||||
|
||||
from langchain_core.tools import tool
|
||||
|
||||
|
||||
def create_create_notion_page_tool():
|
||||
@tool
|
||||
async def create_notion_page(
|
||||
title: str,
|
||||
content: str,
|
||||
) -> dict[str, Any]:
|
||||
"""Create a new page in Notion with the given title and content.
|
||||
|
||||
Use this tool when the user asks you to create, save, or publish
|
||||
something to Notion. The page will be created in the user's
|
||||
configured Notion workspace.
|
||||
|
||||
Args:
|
||||
title: The title of the Notion page.
|
||||
content: The markdown content for the page body.
|
||||
"""
|
||||
return {
|
||||
"status": "success",
|
||||
"page_id": "stub-page-id-12345",
|
||||
"title": title,
|
||||
"url": "https://www.notion.so/stub-page-12345",
|
||||
}
|
||||
|
||||
return create_notion_page
|
||||
Loading…
Add table
Add a link
Reference in a new issue