Expand description
Chunk storage CRUD for multi-chunk memories.
Manages the memory_chunks table: insert embeddings for bodies that
exceed the 512-token E5 limit and query chunks for vector search.
Structs§
Functions§
- count_
for_ memory - GAP-SG-40: counts the rows actually persisted in
memory_chunksfor a memory. Single-chunk bodies are stored inline in thememoriesrow and append no chunk rows, so this returns0for them; multi-chunk bodies return the exact number of persisted chunk rows. Callers query this AFTER the transaction commits so the reportedchunks_persistedreflects the observable database state rather than a pre-commit estimate. - delete_
chunks - get_
chunks_ by_ memory - insert_
chunk_ slices - insert_
chunks - knn_
search_ chunks - upsert_
chunk_ vec