I had been researching stuff related to this for some time. Interesting project! Why not an obsidian plugin to tap into the ecosystem?
1. The libraries I used to run models locally didn't work inside a plugin.
2. I believe AI is a fairly big paradigm shift that requires new software.