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

community: Correctly handle multi-element rich text #25762

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

h1ros
Copy link

@h1ros h1ros commented Aug 27, 2024

Description:

  • Add _concatenate_rich_text method to combine all elements in rich text arrays
  • Update load_page method to use _concatenate_rich_text for rich text properties
  • Ensure all text content is captured, including inline code and formatted text
  • Add unit tests to verify correct handling of multi-element rich text
    This fix prevents truncation of content after backticks or other formatting elements.

Issue:

Using Notion DB Loader, the text for richtext and title is truncated after 1st element was loaded as Notion Loader only read the first element.

Dependencies: any dependencies required for this change
None.

- Add _concatenate_rich_text method to combine all elements in rich text arrays
- Update load_page method to use _concatenate_rich_text for rich text properties
- Ensure all text content is captured, including inline code and formatted text
- Add unit tests to verify correct handling of multi-element rich text

This fix prevents truncation of content after backticks or other formatting elements.
Copy link

vercel bot commented Aug 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 7:47am

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. community Related to langchain-community Ɑ: doc loader Related to document loader module (not documentation) labels Aug 27, 2024
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Related to langchain-community Ɑ: doc loader Related to document loader module (not documentation) lgtm PR looks good. Use to confirm that a PR is ready for merging. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

2 participants