pub struct EmbeddingServiceFactory;Expand description
Factory for creating embedding services
Implementations§
Source§impl EmbeddingServiceFactory
impl EmbeddingServiceFactory
Sourcepub async fn create(
config: &EmbeddingConfig,
) -> Result<Arc<dyn EmbeddingService>>
pub async fn create( config: &EmbeddingConfig, ) -> Result<Arc<dyn EmbeddingService>>
Create an embedding service based on configuration
Sourcepub async fn create_with_preference(
preference: Option<&str>,
) -> Result<Arc<dyn EmbeddingService>>
pub async fn create_with_preference( preference: Option<&str>, ) -> Result<Arc<dyn EmbeddingService>>
Create embedding service with preference detection
Auto Trait Implementations§
impl Freeze for EmbeddingServiceFactory
impl RefUnwindSafe for EmbeddingServiceFactory
impl Send for EmbeddingServiceFactory
impl Sync for EmbeddingServiceFactory
impl Unpin for EmbeddingServiceFactory
impl UnwindSafe for EmbeddingServiceFactory
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