数据连接器 (LlamaHub)#
概念#
数据连接器(又称 Reader
)从不同的数据源和数据格式摄取数据,并将其转换为简单的 Document
表示形式(文本和简单元数据)。
LlamaHub#
我们的数据连接器通过LlamaHub 🦙 提供。LlamaHub 是一个开源仓库,包含您可以轻松即插即用到任何 LlamaIndex 应用中的数据加载器。
使用模式#
开始使用
from llama_index.core import download_loader
from llama_index.readers.google import GoogleDocsReader
loader = GoogleDocsReader()
documents = loader.load_data(document_ids=[...])
查看完整的使用模式指南以获取更多详细信息。
模块#
一些示例数据连接器
- 本地文件目录(
SimpleDirectoryReader
)。支持解析多种文件类型:.pdf
,.jpg
,.png
,.docx
等。 - Notion (
NotionPageReader
) - Google Docs (
GoogleDocsReader
) - Slack (
SlackReader
) - Discord (
DiscordReader
) - Apify Actors (
ApifyActor
)。可以抓取网页、刮取网页内容、提取文本内容、下载包括.pdf
,.jpg
,.png
,.docx
等文件。
查看模块指南以获取更多详细信息。