pub struct BuiltinEngine {
pub memories: Vec<Memory>,
pub weights: Weights,
/* private fields */
}Expand description
The default, zero-setup engine: scores an in-memory set with the explainable
scorer. (A SQLite-backed variant just loads memories from the DB first.)
With an Embedder attached, similarity becomes semantic (cosine over
embeddings); without one, it falls back to lexical term overlap.
Fields§
§memories: Vec<Memory>§weights: WeightsImplementations§
Source§impl BuiltinEngine
impl BuiltinEngine
pub fn new(memories: Vec<Memory>) -> Self
pub fn with_weights(self, weights: Weights) -> Self
Sourcepub fn with_embedder(self, embedder: Arc<dyn Embedder>) -> Result<Self>
pub fn with_embedder(self, embedder: Arc<dyn Embedder>) -> Result<Self>
Attach an embedder and precompute embeddings for every memory that lacks one. Returns an error if embedding fails (e.g. Ollama not running).
Trait Implementations§
Source§impl MemoryEngine for BuiltinEngine
impl MemoryEngine for BuiltinEngine
Auto Trait Implementations§
impl !RefUnwindSafe for BuiltinEngine
impl !UnwindSafe for BuiltinEngine
impl Freeze for BuiltinEngine
impl Send for BuiltinEngine
impl Sync for BuiltinEngine
impl Unpin for BuiltinEngine
impl UnsafeUnpin for BuiltinEngine
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