pub struct EmbeddingEngine { /* private fields */ }Expand description
Embedding-only engine wrapping a ClipModelExecutor.
Implementations§
Source§impl EmbeddingEngine
impl EmbeddingEngine
pub fn new(executor: ClipModelExecutor, config: EngineConfig) -> Self
Sourcepub fn with_tokenizer(self, tokenizer: Tokenizer) -> Self
pub fn with_tokenizer(self, tokenizer: Tokenizer) -> Self
Set tokenizer for text embedding.
Trait Implementations§
Source§impl EmbedEngine for EmbeddingEngine
impl EmbedEngine for EmbeddingEngine
Source§fn embed_text<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<f32>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn embed_text<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<f32>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Embed raw text string → float vector (engine handles tokenization).
Source§fn embed_image<'life0, 'life1, 'async_trait>(
&'life0 self,
image: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<f32>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn embed_image<'life0, 'life1, 'async_trait>(
&'life0 self,
image: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<f32>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Embed image (file path or base64) → float vector.
Source§fn embedding_dim(&self) -> usize
fn embedding_dim(&self) -> usize
Get embedding dimension.
Source§impl InferenceEngine for EmbeddingEngine
impl InferenceEngine for EmbeddingEngine
Source§fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = EngineStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = EngineStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get current engine status.
Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shutdown engine gracefully.
Source§fn config(&self) -> &EngineConfig
fn config(&self) -> &EngineConfig
Get engine configuration.
Source§fn metrics(&self) -> EngineMetrics
fn metrics(&self) -> EngineMetrics
Get engine metrics.
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Health check.
Source§fn cache_metrics_snapshot(&self) -> Option<Value>
fn cache_metrics_snapshot(&self) -> Option<Value>
Optional cache metrics emitted by concrete LLM engines. Read more
Source§fn admission_snapshot(
&self,
) -> Result<Option<ExecutorAdmissionSnapshot>, FerrumError>
fn admission_snapshot( &self, ) -> Result<Option<ExecutorAdmissionSnapshot>, FerrumError>
Runtime-authoritative admission state. Startup sizing estimates are
intentionally not accepted through this method.
Source§fn lora_metrics_snapshot(&self) -> Option<Value>
fn lora_metrics_snapshot(&self) -> Option<Value>
Optional LoRA runtime metrics emitted by concrete LLM engines.
Auto Trait Implementations§
impl !Freeze for EmbeddingEngine
impl !RefUnwindSafe for EmbeddingEngine
impl !UnwindSafe for EmbeddingEngine
impl Send for EmbeddingEngine
impl Sync for EmbeddingEngine
impl Unpin for EmbeddingEngine
impl UnsafeUnpin for EmbeddingEngine
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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