langchain
langchain copied to clipboard
Obsidian front_matter fix
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
could we add a unit test that would've previously failed and now passes
Looks good to me, but would be very nice to have a unit test if possible
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: @.***>
stale, happy to re-review if you have time to update @effi!