pub struct EmbeddingProviderFactory;Expand description
Factory that creates EmbeddingProvider instances by name.
Implementations§
Source§impl EmbeddingProviderFactory
impl EmbeddingProviderFactory
Sourcepub fn create(
provider_name: &str,
api_key: impl Into<String>,
model: Option<String>,
) -> ArgentorResult<Box<dyn EmbeddingProvider>>
pub fn create( provider_name: &str, api_key: impl Into<String>, model: Option<String>, ) -> ArgentorResult<Box<dyn EmbeddingProvider>>
Create an embedding provider from its string name.
Supported names: "openai", "cohere", "voyage", "local".
Sourcepub fn available_providers() -> &'static [&'static str]
pub fn available_providers() -> &'static [&'static str]
List all supported provider names.
Auto Trait Implementations§
impl Freeze for EmbeddingProviderFactory
impl RefUnwindSafe for EmbeddingProviderFactory
impl Send for EmbeddingProviderFactory
impl Sync for EmbeddingProviderFactory
impl Unpin for EmbeddingProviderFactory
impl UnsafeUnpin for EmbeddingProviderFactory
impl UnwindSafe for EmbeddingProviderFactory
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