mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-13 05:25:07 +00:00
Add Joplin document loader (#5153)
# Add Joplin document loader [Joplin](https://joplinapp.org/) is an open source note-taking app. Joplin has a [REST API](https://joplinapp.org/api/references/rest_api/) for accessing its local database. The proposed `JoplinLoader` uses the API to retrieve all notes in the database and their metadata. Joplin needs to be installed and running locally, and an access token is required. - The PR includes an integration test. - The PR includes an example notebook. --------- Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
This commit is contained in:
11
tests/integration_tests/document_loaders/test_joplin.py
Normal file
11
tests/integration_tests/document_loaders/test_joplin.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from langchain.document_loaders.joplin import JoplinLoader
|
||||
|
||||
|
||||
def test_joplin_loader() -> None:
|
||||
loader = JoplinLoader()
|
||||
docs = loader.load()
|
||||
|
||||
assert type(docs) is list
|
||||
assert type(docs[0].page_content) is str
|
||||
assert type(docs[0].metadata["source"]) is str
|
||||
assert type(docs[0].metadata["title"]) is str
|
Reference in New Issue
Block a user