Expand description
§orbok-models
Local AI model vocabulary (RFC-012). Milestone M1–M6 only needs the shared types and the “what is available” summary the UI shows; the install/locate/validate workflow lands in M12.
Privacy rule carried from the requirements: model download is the only network operation orbok may ever perform, it is explicit, and it never involves document contents.
Structs§
- Mock
Embedding Model - Deterministic 8-dimensional mock embedding model.
- Vector
Candidate - A vector search candidate (RFC-008 §13).
Enums§
- Model
Role - Model roles (catalog
models.role). - Model
Status - Model availability (catalog
models.status). - Search
Capability - Search capability derived from model availability. Keyword search never depends on models (RFC-007: works with zero models installed).
Traits§
- Embedding
Model - Local embedding model abstraction (RFC-008 §6).
Functions§
- blob_
to_ vec - Deserialize from BLOB bytes; returns
Noneon length mismatch. - cosine_
similarity - Compute cosine similarity between two L2-normalized vectors.
- l2_
normalize - L2-normalize a vector in-place. No-op for the zero vector.
- search_
capability - Derive the capability shown in the UI from model statuses.
- vec_
to_ blob - Serialize a vector to little-endian bytes for BLOB storage (RFC-008 §12.1 “sqlite_blob with FP32”).