Skip to main content

embedding_dim_from_runtime

Function embedding_dim_from_runtime 

Source
pub fn embedding_dim_from_runtime() -> Option<usize>
Expand description

Reads the CLI --embedding-dim flag or the XDG key embedding.dim.

Values outside EMBEDDING_DIM_RANGE are rejected with a warning rather than clamped: a clamped width would still mismatch the stored vectors, and cosine_similarity reports a dimension mismatch as 0.0 with no error, so the search would go quiet instead of failing.