Skip to main content

get_embedding

Function get_embedding 

Source
pub fn get_embedding(conn: &Connection, id: &str) -> Result<Option<Vec<f32>>>
Expand description

Load an embedding vector for a memory. Returns None if not set.

v0.6.3.1 P2 — tolerant of legacy unheaded payloads (raw LE f32, length 4n) and v17 headed payloads (0x01 + 4n bytes). Anything else returns an error so the caller can surface a typed corruption signal.

§Errors

Returns EmbeddingFormatError when the on-disk BLOB is malformed.