mirror of
https://github.com/hwchase17/langchain
synced 2024-11-08 07:10:35 +00:00
44abe925df
# 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>
12 lines
325 B
Python
12 lines
325 B
Python
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
|