pub struct DummyEmbeddingProvider { /* private fields */ }Expand description
Hash-based deterministic embeddings — no model needed, good for tests.
Implementations§
Trait Implementations§
Source§impl Default for DummyEmbeddingProvider
impl Default for DummyEmbeddingProvider
Source§impl EmbeddingProvider for DummyEmbeddingProvider
impl EmbeddingProvider for DummyEmbeddingProvider
fn model_name(&self) -> &'static str
fn content_dim(&self) -> usize
fn trigger_dim(&self) -> usize
fn embed_content(&self, text: &str) -> Result<Vec<f32>>
fn embed_trigger(&self, text: &str) -> Result<Vec<f32>>
Source§fn embed_both(&self, text: &str) -> Result<(Vec<f32>, Vec<f32>)>
fn embed_both(&self, text: &str) -> Result<(Vec<f32>, Vec<f32>)>
Embed
text for both the content and trigger spaces. Default issues two
separate calls. Providers backed by a single shared model (e.g. a remote
embedding endpoint) should override this to make one request and avoid the
duplicate round trip on the recall hot path.Auto Trait Implementations§
impl Freeze for DummyEmbeddingProvider
impl RefUnwindSafe for DummyEmbeddingProvider
impl Send for DummyEmbeddingProvider
impl Sync for DummyEmbeddingProvider
impl Unpin for DummyEmbeddingProvider
impl UnsafeUnpin for DummyEmbeddingProvider
impl UnwindSafe for DummyEmbeddingProvider
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