Is your feature request related to a problem? Please describe.
Allows people to resurface notes that are similar & allow people to search notes with AI.
Describe the solution you'd like
Basically, on save (frontend), a hash will be created pushed into the note text hash table & an embedding will be created if the hash does not exist.
Embedding will be created probably with the open AI api
when searching an input will be text & the notes will be searched through the function.
When you enable the plugin, the plugin will backfill the hashes.
[ ] remove dio dependency
two tables:
embeddings table (hash (id) , embeddings), hash as key
note text hash table (auto updated, 3 columns: hash, note_column, note_id) - note_id / note_column as key
two funcitons:
one that takes a supabase_json object(s) & creates the embeddings / updates the hash table (uses AI)
one that takes a string as input (+ user credentials) & returns a list of all note ids with similarity scores.
Describe alternatives you've considered
use locally hosted text embedders on deno (this is a lot more work)
make sure to update the delete-user to also delete the note text hash table.
Is your feature request related to a problem? Please describe. Allows people to resurface notes that are similar & allow people to search notes with AI.
Describe the solution you'd like
two tables:
two funcitons:
Describe alternatives you've considered
Additional context text embedding comparison article