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: notion loader #405

Merged
merged 4 commits into from
Aug 9, 2023
Merged

feat: notion loader #405

merged 4 commits into from
Aug 9, 2023

Conversation

cachho
Copy link
Contributor

@cachho cachho commented Aug 7, 2023

Description

  • notion loader
  • notion chunker (copy of text)
  • id parser
  • docs
  • error handling for import error

Missing:

  • unit tests
  • does definitely not work for public pages, I tested this and I guess the connection is not enabled
  • documentation how to enable the connection in notion is not included

Notes:

  • errors for no connection are really bad (this should ideally be improved by the dependency)

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #26

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Please delete options that are not relevant.

  • Unit Test
  • Test Script (please provide)
import os

from embedchain import App
from embedchain.config import AppConfig

config = AppConfig(log_level="DEBUG")
app = App(config=config)
os.environ["NOTION_INTEGRATION_TOKEN"] = "secret"

id = "test-cfbc134ca6464fc980d0391613959196"
app.add("notion", "cfbc134ca6464fc980d0391613959196")
app.add("notion", "my-page-cfbc134ca6464fc980d0391613959196")
app.add("notion", "https://www.notion.so/my-page-cfbc134ca6464fc980d0391613959196")

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Made sure Checks passed

@cachho cachho changed the title Feat/notion feat: notion loader Aug 7, 2023
@cachho cachho added enhancement New feature or request new-data-source New data source labels Aug 7, 2023
Copy link
Member

@taranjeet taranjeet left a comment

Choose a reason for hiding this comment

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

looks good. left one minor comment.

The next argument must **end** with the `notion page id`. The id is a 32-character string. Eg:

```python
app.add("notion", "cfbc134ca6464fc980d0391613959196")
Copy link
Member

Choose a reason for hiding this comment

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

the signature will change once we merge #380

pyproject.toml Outdated Show resolved Hide resolved
@taranjeet taranjeet merged commit ce6eb39 into mem0ai:main Aug 9, 2023
3 checks passed
@cachho cachho deleted the feat/Notion branch August 10, 2023 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new-data-source New data source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Notion
2 participants