Files
langchain/docs/modules/indexes/document_loaders/examples/obsidian.ipynb
T
2023-04-17 21:57:32 -07:00

1.6 KiB

Obsidian

This notebook covers how to load documents from an Obsidian database.

Since Obsidian is just stored on disk as a folder of Markdown files, the loader just takes a path to this directory.

Obsidian files also sometimes contain metadata which is a YAML block at the top of the file. These values will be added to the document's metadata. (ObsidianLoader can also be passed a collect_metadata=False argument to disable this behavior.)

In [1]:
from langchain.document_loaders import ObsidianLoader
In [ ]:
loader = ObsidianLoader("<path-to-obsidian>")
In [ ]:
docs = loader.load()