langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Obsidian front_matter fix

Open effi opened this issue 1 year ago • 2 comments

ObsidianLoader front_matter fixed to proper YAML parsing

Obsidian Notes can have front_matter at the beginning of their markdown files. This front_matter is formatted as YAML. The previous implementation simply went through line-by-line checking for a key-value pair. This PR uses the python yaml package to parse the front_matter, allowing for all kind of YAML compatible front_matter in line with the Obsidian rules.

At the same time, variable names in the ObsidianLoader class were replaced from single letter or abbreviations to named variables.

Fixes #4991

Who can review?

Community members can review the PR once tests pass. Tag maintainers/contributors who might be interested: @eyurtsev

effi avatar May 19 '23 16:05 effi

could we add a unit test that would've previously failed and now passes

dev2049 avatar May 19 '23 21:05 dev2049

Looks good to me, but would be very nice to have a unit test if possible

eyurtsev avatar May 23 '23 15:05 eyurtsev

I will look into creating one tomorrow

Eugene Yurtsev @.***> schrieb am Di. 23. Mai 2023 um 17:09:

Looks good to me, but would be very nice to have a unit test if possible

— Reply to this email directly, view it on GitHub https://github.com/hwchase17/langchain/pull/4992#issuecomment-1559635641, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIDKBQHYI6EHCP5XO4D5F3XHTHJVANCNFSM6AAAAAAYIAKKJU . You are receiving this because you authored the thread.Message ID: @.***>

effi avatar May 23 '23 18:05 effi

stale, happy to re-review if you have time to update @effi!

baskaryan avatar Aug 11 '23 22:08 baskaryan