logancyang / obsidian-copilot

A ChatGPT Copilot in Obsidian
https://www.obsidiancopilot.com/
GNU Affero General Public License v3.0
2.3k stars 153 forks source link

Feature Requests #2

Open Benniongithub opened 1 year ago

Benniongithub commented 1 year ago

Amazing app, but to become really useful I think there are a few low hanging fruits you can integrate! I would recommend using langchain as a framework as it makes it really easy to work with LLMs. langchain is more powerful in python, but there is also a typescript integration.

  1. Full control over the chat and context like in the openAI playground (delete, create or edit chat messages and continue conversations at a later time)
  2. Slice and index notes and save locally using a local vector database server (for example https://weaviate.io/) This makes it possible to search across the whole vault semantically and use context from anywhere at any time. For slicing there are several options built into langchain. https://docs.langchain.com/docs/components/indexing
michox commented 1 year ago

For context awareness of the copilot, you could use the langchain contextual compression retriever. With that you can first find the closest documents in your vault, compress their knowledge into relevant packs of knowhow and then use that as prompt context. https://python.langchain.com/en/latest/modules/indexes/retrievers/examples/contextual-compression.html

logancyang commented 1 year ago

@Benniongithub @michox Thanks for the suggestions! Great ideas! I was thinking about this, and was mainly looking at LlamaIndex since they seem to already have an Obsidian connector. I also echo the local-first philosophy which Obsidian itself is a great example of.

Just curious, how did you guys find out about this project? I haven't announced it anywhere and it's still under plugin review. Planning to make an announcement soon.

michox commented 1 year ago

I just saw that langchain also has an obsidian loader. It also has pretty much any other loader you can imagine and an automated loader, but besides that langchain is way more powerful in general. I was actively looking for obsidian AI plugins :)

logancyang commented 1 year ago

Will be addressed by https://github.com/logancyang/obsidian-copilot/issues/16