feat(document-reader): add Notion document reader support #274 #345
+756
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Notion Document Reader Support
添加 Notion 文档读取器支持
Features 功能特性
添加 NotionResource 类处理 Notion API 交互
添加 NotionDocumentReader 实现 DocumentReader 接口
支持 Notion 页面和数据库两种内容类型
添加完整的元数据提取功能
添加基于环境变量的集成测试
Implementation Details 实现细节
NotionResource
处理 Notion API 认证
支持页面和数据库内容获取
从 API 响应中提取元数据
NotionDocumentReader
实现 Spring AI 的 DocumentReader 接口
将 Notion 内容转换为 Document 格式
安全处理元数据,包含空值检查
Integration Tests
测试页面和数据库的读取功能
验证元数据提取
使用环境变量存储凭证
Usage 使用方法