pub struct SemanticEmbeddingModel { /* private fields */ }Implementations§
Source§impl SemanticEmbeddingModel
impl SemanticEmbeddingModel
pub fn from_config(config: &SemanticBackendConfig) -> Result<Self, String>
pub fn backend(&self) -> SemanticBackend
pub fn model(&self) -> &str
pub fn base_url(&self) -> Option<&str>
pub fn max_batch_size(&self) -> usize
pub fn timeout_ms(&self) -> u64
pub fn fingerprint( &mut self, config: &SemanticBackendConfig, ) -> Result<SemanticIndexFingerprint, String>
pub fn dimension(&mut self) -> Result<usize, String>
pub fn embed(&mut self, texts: Vec<String>) -> Result<Vec<Vec<f32>>, String>
pub fn embed_query_cached(&mut self, query: &str) -> Result<Vec<f32>, String>
pub fn query_embedding_cache_stats(&self) -> (u64, u64, usize)
Auto Trait Implementations§
impl !Freeze for SemanticEmbeddingModel
impl !RefUnwindSafe for SemanticEmbeddingModel
impl Send for SemanticEmbeddingModel
impl Sync for SemanticEmbeddingModel
impl Unpin for SemanticEmbeddingModel
impl UnsafeUnpin for SemanticEmbeddingModel
impl !UnwindSafe for SemanticEmbeddingModel
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more