Load all existing memories from the store into the vector index.
(&self)
| 192 | |
| 193 | /// Load all existing memories from the store into the vector index. |
| 194 | async fn load_existing_memories(&self) -> GraphBitResult<()> { |
| 195 | let all_memories = self.store.get_all_memories(&MemoryScope::default()).await?; |
| 196 | for memory in &all_memories { |
| 197 | let embedding = self.embedding_service.embed_text(&memory.content).await?; |
| 198 | self.vector_index |
| 199 | .insert(memory.id.clone(), embedding) |
| 200 | .await; |
| 201 | } |
| 202 | Ok(()) |
| 203 | } |
| 204 | |
| 205 | /// Create a brand-new memory: hash, embed, store, index, record history. |
| 206 | async fn create_memory( |
no test coverage detected