pub struct MockEmbeddingModel;Expand description
Deterministic 8-dimensional mock embedding model.
Uses the SHA-256 of the input text as a pseudo-random source for 8 f32 components, then L2-normalizes the result. Never use for semantic search — the outputs are semantically meaningless. Suitable for pipeline correctness tests (RFC-008 §24 tests 1–10).
Trait Implementations§
Source§impl EmbeddingModel for MockEmbeddingModel
impl EmbeddingModel for MockEmbeddingModel
Source§fn embed_batch(&self, texts: &[&str]) -> OrbokResult<Vec<Vec<f32>>>
fn embed_batch(&self, texts: &[&str]) -> OrbokResult<Vec<Vec<f32>>>
Embed a batch of normalized texts. Returns one vector per input,
each L2-normalized.
Auto Trait Implementations§
impl Freeze for MockEmbeddingModel
impl RefUnwindSafe for MockEmbeddingModel
impl Send for MockEmbeddingModel
impl Sync for MockEmbeddingModel
impl Unpin for MockEmbeddingModel
impl UnsafeUnpin for MockEmbeddingModel
impl UnwindSafe for MockEmbeddingModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more