pub struct ProviderFactory;Expand description
Provider factory for creating LLM and embedding providers
Implementations§
Source§impl ProviderFactory
impl ProviderFactory
Sourcepub fn create_llm_provider(
provider_type: LlmProvider,
api_key: String,
base_url: Option<String>,
model: String,
) -> Result<Box<dyn LlmProviderTrait>>
pub fn create_llm_provider( provider_type: LlmProvider, api_key: String, base_url: Option<String>, model: String, ) -> Result<Box<dyn LlmProviderTrait>>
Create LLM provider from configuration
Sourcepub fn create_embedding_provider(
provider_type: EmbeddingProvider,
api_key: String,
base_url: Option<String>,
model: String,
) -> Result<Box<dyn EmbeddingProviderTrait>>
pub fn create_embedding_provider( provider_type: EmbeddingProvider, api_key: String, base_url: Option<String>, model: String, ) -> Result<Box<dyn EmbeddingProviderTrait>>
Create embedding provider from configuration
Auto Trait Implementations§
impl Freeze for ProviderFactory
impl RefUnwindSafe for ProviderFactory
impl Send for ProviderFactory
impl Sync for ProviderFactory
impl Unpin for ProviderFactory
impl UnwindSafe for ProviderFactory
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