Skip to main content

upsert_vec

Function upsert_vec 

Source
pub fn upsert_vec(
    conn: &Connection,
    memory_id: i64,
    namespace: &str,
    _memory_type: &str,
    embedding: &[f32],
    _name: &str,
    _snippet: &str,
) -> Result<(), AppError>
Expand description

Replaces the vector row for a memory in memory_embeddings.

v1.0.76: sqlite-vec was removed. Embeddings live in a regular BLOB-backed table; cosine similarity is computed in pure Rust on demand. The memory_type, name, and snippet arguments are accepted for API compatibility but are not stored — the FTS5 shadow table is the source of truth for textual metadata.

§Errors

Returns Err(AppError::Database) on any rusqlite failure.