Skip to main content

embedding_dim

Function embedding_dim 

Source
pub fn embedding_dim() -> usize
Expand description

Resolves the active embedding dimensionality (single source of truth).

Precedence:

  1. SQLITE_GRAPHRAG_EMBEDDING_DIM env var (also set by the global --embedding-dim flag before dispatch);
  2. the value recorded via set_active_embedding_dim — populated from the dim key of schema_meta when the database is opened, so existing 384-dim databases keep working unchanged;
  3. DEFAULT_EMBEDDING_DIM.