Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add Google OneNote Document Reader Support #392

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Sparkle6979
Copy link

Describe what this PR does / why we need it

This PR introduces the OneNote Document Reader component, which supports fetching content from OneNote resources of three types: Notebook, Section, and individual Page. The component integrates with the Microsoft Graph API to retrieve relevant metadata and page content for each resource type.

该PR引入了OneNote文档读取组件,支持从三种类型的OneNote资源中获取内容:Notebook(笔记本),Section(分区)和单个Page(页面)。该组件与Microsoft Graph API集成,用于获取每种资源类型的相关元数据和页面内容。

Does this pull request fix one issue?

#98

Describe how you did it

OneNoteDocumentReader

  • Implement Spring AI's DocumentReader interface
  • 实现 Spring AI 的 DocumentReader 接口
  • Convert Notion content to Document format
  • 将 Notion 内容转换为 Document 格式
  • Handle metadata safely with null checks
  • 安全处理元数据,包含空值检查
    Integration Tests
  • Test both page and database reading
  • 测试页面和数据库的读取功能
  • Verify metadata extraction
  • 验证元数据提取
  • Use environment variables for credentials
  • 使用环境变量存储凭证

Describe how to verify it

  • Ensure that the OneNote Document Reader can successfully fetch content from a notebook, section, and page.
  • 确保OneNote Document Reader能够成功从笔记本、分区和页面中获取内容。
  • Validate that the metadata for each resource type is correctly populated, including resource ID, creation time, last modified time, and content URL.
  • 验证每种资源类型的元数据是否正确填充,包括资源ID、创建时间、最后修改时间和内容URL。
  • Review the logging and error messages to ensure they provide useful information for debugging.
  • 审查日志和错误信息,确保它们提供有用的调试信息。
  • Run unit tests to ensure the component works as expected for all resource types.
  • 运行单元测试和集成测试,确保功能预期工作。

@CLAassistant
Copy link

CLAassistant commented Jan 27, 2025

CLA assistant check
All committers have signed the CLA.

@Sparkle6979 Sparkle6979 changed the title Add Google OneNote Document Reader Support Feat: Add Google OneNote Document Reader Support Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants