pub struct SemanticCachePutOpts {
pub content_type: String,
pub ttl_secs: Option<u64>,
pub cost_hint_ms: Option<u32>,
pub model: String,
}Expand description
Options for crate::Mnemo::cache_put_semantic. Same as
CachePutOpts plus a required model string — a hit from a
different embedding model’s cache is a semantics bug, not a win, so
the engine forces callers to declare the model and matches it on
lookup.
The vector itself is a separate argument to cache_put_semantic
(not inside opts) so callers who already own the vector don’t have
to .clone() it into the struct.
Fields§
§content_type: StringFree-form content-type label recorded on the entry.
ttl_secs: Option<u64>TTL in seconds. Omit for no expiry.
cost_hint_ms: Option<u32>Cost hint recorded on the entry (see CachePutOpts::cost_hint_ms).
model: StringEmbedding model identifier. Matched exactly on lookup; a
different model’s cache is invisible to this query. Convention:
"text-embedding-3-small", "bge-large-en-v1.5", etc.
Implementations§
Trait Implementations§
Source§impl Clone for SemanticCachePutOpts
impl Clone for SemanticCachePutOpts
Auto Trait Implementations§
impl Forget for SemanticCachePutOpts
impl Freeze for SemanticCachePutOpts
impl RefUnwindSafe for SemanticCachePutOpts
impl Send for SemanticCachePutOpts
impl Sync for SemanticCachePutOpts
impl Unpin for SemanticCachePutOpts
impl UnsafeUnpin for SemanticCachePutOpts
impl UnwindSafe for SemanticCachePutOpts
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