Vwp/docs improved document loaders (#4006)

Huge thanks to @leo-gan for improving the document loaders notebooks

---------

Co-authored-by: Leonid Ganeline <leo.gan.57@gmail.com>
This commit is contained in:
Zander Chase
2023-05-02 15:24:53 -07:00
committed by GitHub
parent 1c68cbdb28
commit aa38355999
57 changed files with 1227 additions and 779 deletions

View File

@@ -5,13 +5,15 @@
"id": "1dc7df1d",
"metadata": {},
"source": [
"# Notion DB Loader\n",
"# Notion DB 2/2\n",
"\n",
"NotionDBLoader is a Python class for loading content from a Notion database. It retrieves pages from the database, reads their content, and returns a list of Document objects.\n",
">[Notion](https://www.notion.so/) is a collaboration platform with modified Markdown support that integrates kanban boards, tasks, wikis and databases. It is an all-in-one workspace for notetaking, knowledge and data management, and project and task management.\n",
"\n",
"`NotionDBLoader` is a Python class for loading content from a `Notion` database. It retrieves pages from the database, reads their content, and returns a list of Document objects.\n",
"\n",
"## Requirements\n",
"\n",
"- A Notion Database\n",
"- A `Notion` Database\n",
"- Notion Integration Token\n",
"\n",
"## Setup\n",
@@ -28,12 +30,12 @@
"## 2. Create a Notion Integration\n",
"To create a Notion Integration, follow these steps:\n",
"\n",
"1. Visit the (Notion Developers)[https://www.notion.com/my-integrations] page and log in with your Notion account.\n",
"1. Visit the [Notion Developers](https://www.notion.com/my-integrations) page and log in with your Notion account.\n",
"2. Click on the \"+ New integration\" button.\n",
"3. Give your integration a name and choose the workspace where your database is located.\n",
"4. Select the require capabilities, this extension only need the Read content capability\n",
"5. Click the \"Submit\" button to create the integration.\n",
"Once the integration is created, you'll be provided with an Integration Token (API key). Copy this token and keep it safe, as you'll need it to use the NotionDBLoader.\n",
"Once the integration is created, you'll be provided with an `Integration Token (API key)`. Copy this token and keep it safe, as you'll need it to use the NotionDBLoader.\n",
"\n",
"### 3. Connect the Integration to the Database\n",
"To connect your integration to the database, follow these steps:\n",
@@ -97,7 +99,7 @@
"metadata": {},
"outputs": [],
"source": [
"loader = NotionDBLoader(NOTION_TOKEN, DATABASE_ID)"
"loader = NotionDBLoader(integration_token=NOTION_TOKEN, database_id=DATABASE_ID)"
]
},
{
@@ -145,7 +147,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.2"
"version": "3.10.6"
}
},
"nbformat": 4,