面向开发者的LLM入门教程-文档加载-Notion文档: Notion文档 · 点击Notion示例文档(https://yolospace.notion.site/Blendle-s-Employee-Handbook-e31bff7da17346ee99f53……
哈喽!伙伴们,我是小智,你们的AI向导。欢迎来到每日的AI学习时间。今天,我们将一起深入AI的奇妙世界,探索“面向开发者的LLM入门教程-文档加载-Notion文档”,并学会本篇文章中所讲的全部知识点。还是那句话“不必远征未知,只需唤醒你的潜能!”跟着小智的步伐,我们终将学有所成,学以致用,并发现自身的更多可能性。话不多说,现在就让我们开始这场激发潜能的AI学习之旅吧。
面向开发者的LLM入门教程-文档加载-Notion文档:
Notion文档
· 点击Notion示例文档(https://yolospace.notion.site/Blendle-s-Employee-Handbook-e31bff7da17346ee99f531087d8b133f)右上方复制按钮(Duplicate),复制文档到你的Notion空间
· 点击右上方 ⋯ 按钮,选择导出为Mardown&CSV。导出的文件将为zip文件夹
· 解压并保存mardown文档到本地路径 docs/Notion_DB/
1.加载Notion Markdown文档
首先,我们将使用 NotionDirectoryLoader 来对Notion Markdown文档进行加载。
from langchain.document_loaders import NotionDirectoryLoader
loader = NotionDirectoryLoader(“docs/Notion_DB”)
pages = loader.load()
2.探索加载的数据
同理,使用上文代码:
print(“Type of pages: “, type(pages))
print(“Length of pages: “, len(pages))page = pages[0]
print(“Type of page: “, type(page))
print(“Page_content: “, page.page_content[:500])
print(“Meta Data: “, page.metadata)
Type of pages:
Length of pages: 51
Type of page:
Page_content: # #letstalkaboutstressLet’s talk about stress. Too much stress.
We know this can be a topic.
So let’s get this conversation going.
[Intro: two things you should know]
(#letstalkaboutstress%2064040a0733074994976118bbe0acc7fb/Intro%20two%20things%20y
ou%20should%20know%20b5fd0c5393a9498b93396e79fe71e8bf.md)[What is stress]
(#letstalkaboutstress%2064040a0733074994976118bbe0acc7fb/What%20is%20stress%20b19
8b685ed6a474ab14f6fafff7004b6.md)
[When is there too much stress?](#letstalkaboutstress%2
Meta Data: {‘source’: ‘docs/Notion_DB/#letstalkaboutstress
64040a0733074994976118bbe0acc7fb.md’}
嘿,伙伴们,今天我们的AI探索之旅已经圆满结束。关于“面向开发者的LLM入门教程-文档加载-Notion文档”的内容已经分享给大家了。感谢你们的陪伴,希望这次旅程让你对AI能够更了解、更喜欢。谨记,精准提问是解锁AI潜能的钥匙哦!如果有小伙伴想要了解学习更多的AI知识,请关注我们的官网“AI智研社”,保证让你收获满满呦!
还没有评论呢,快来抢沙发~