A local associative memory plugged into the library and matching a typespec.
[x] Add a memory-mode remember
[ ] If value for memorize is an array of text, process them in parallel (combining into a single request) instead of sequentially (which adds a network round trip time * items.length)
[x] Consider renameing default_memory (currently _default) to something more dsitinctivee that it's being used in a memory context, not a proflie context (similar to ids having c_whatever
[x] Memoize hsnw readers when vending them out
[x] Everywhere that a seed expects a string, have extractString() and accept an embedding too (document this)
[ ] Only save hsnw every so often (and on process exist)
[ ] If query is not provided, create a random embedding and fetch
[x] Persist the text to memory (just flat json, then later duckdb). Get the vector from hsnw.getPoint()
[ ] Store metadata in duckdb (this is more efficient for larger memories but is less easy to debug)
[x] embedding.text should not be optional
[x] Profile.recall / memorize shouldn't have defaults, that should be on the caller to provide
[x] Recreate embeddings of the proper type and constructor from persisted data. (Can I use query.constructor?)
[x] Set maxElements intelligently and handle resizing into a larger store
[ ] Add a read_only ability for memory (where writing can only be done if a secret boolean key to allow all writes in env (or maybe it should be that it needs an access key to allow writing it? That would allow even remote memory writing: See #28 ))
[ ] Clean up th etesting recall seed by actually using real (cached) embeddings for those values. This is somewaht important to verify the sorting is actually correct and not backwards...
[x] Store the memories in .profile/memory/MEMORY-NAME/${normalized_embedding_model_name}/hsnw.db. This requires the embedding_model_name to not have any illegal path characters
[x] Allow recall.k seed argument to be omitted (needs new machinery possibly to allow optional. And then maybe allow memory to be provided as optional argument (falling back to env.memory) on recall and memorize using same machinery))
A local associative memory plugged into the library and matching a typespec.
value
for memorize is an array of text, process them in parallel (combining into a single request) instead of sequentially (which adds a network round trip time * items.length)_default
) to something more dsitinctivee that it's being used in a memory context, not a proflie context (similar to ids havingc_whatever
testing recall seed
by actually using real (cached) embeddings for those values. This is somewaht important to verify the sorting is actually correct and not backwards....profile/memory/MEMORY-NAME/${normalized_embedding_model_name}/hsnw.db
. This requires the embedding_model_name to not have any illegal path charactersrecall.k
seed argument to be omitted (needs new machinery possibly to allow optional. And then maybe allowmemory
to be provided as optional argument (falling back to env.memory) on recall and memorize using same machinery))