paulbricman / dual-obsidian-client

A skilled virtual assistant for Obsidian.
https://paulbricman.com/thoughtware/dual
Mozilla Public License 2.0
242 stars 7 forks source link

Implement embedding cache. #1

Closed paulbricman closed 3 years ago

paulbricman commented 3 years ago

In order for subsequent operations to be tractable on light hardware, a caching strategy should be used. The goal is to maintain a dictionary of precomputed embeddings for each file. This way, subsequent operations can simply load the embeddings without computing them again.

This cache manager should:

Embeddings should be based on the sentence-bert module, like in MemNav. The dictionary can be stored in a pickle in a hidden local folder.

Front matter should be ignored. And perhaps also headings. Some Markdown-specific module might already be able to sort this out.