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

Let Notion document loader support utf-8 and make it default. #10613

Merged
merged 3 commits into from
Oct 12, 2023

Conversation

richarddwang
Copy link
Contributor

  • Description: Let Notion document loader support utf-8 and make it default. Otherwise, it gets an error when reading non-English documents.
  • Issue: Not applicable.
  • Dependencies: None.
  • Tag maintainer:
  • Twitter handle: richarddwang

@vercel
Copy link

vercel bot commented Sep 15, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Oct 12, 2023 3:48pm

@dosubot dosubot bot added Ɑ: doc loader Related to document loader module (not documentation) 🤖:improvement Medium size change to existing code to handle new use-cases labels Sep 15, 2023
@eyurtsev eyurtsev self-requested a review October 6, 2023 13:56
@@ -8,16 +8,17 @@
class NotionDirectoryLoader(BaseLoader):
"""Load `Notion directory` dump."""

def __init__(self, path: str):
def __init__(self, path: str, encoding: str = 'utf-8'):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def __init__(self, path: str, encoding: str = 'utf-8'):
def __init__(self, path: str, *, encoding: str = 'utf-8'):

@eyurtsev
Copy link
Collaborator

eyurtsev commented Oct 6, 2023

@richarddwang this looks good, will merge once tests pass

@eyurtsev eyurtsev added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Oct 12, 2023
@eyurtsev
Copy link
Collaborator

Can merge after tests pass

@eyurtsev eyurtsev merged commit 6402c33 into langchain-ai:master Oct 12, 2023
31 checks passed
hoanq1811 pushed a commit to hoanq1811/langchain that referenced this pull request Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ɑ: doc loader Related to document loader module (not documentation) 🤖:improvement Medium size change to existing code to handle new use-cases lgtm PR looks good. Use to confirm that a PR is ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants