pub struct ProviderBuilder<P> { /* private fields */ }Implementations§
Source§impl<P> ProviderBuilder<P>
impl<P> ProviderBuilder<P>
pub fn new() -> Self
pub fn api_key(self, key: impl Into<String>) -> Self
pub fn api_base(self, base: impl Into<String>) -> Self
pub fn models(self, models: Vec<ModelInfo>) -> Self
pub fn with_config(self, config: ModelConfig) -> Self
pub fn build(self) -> Result<P>where
P: Provider,
pub fn take_models(&mut self) -> Option<Vec<ModelInfo>>
pub fn get_api_key(&self) -> Option<&str>
pub fn get_api_base(&self) -> Option<&str>
pub fn take_config(&mut self) -> Option<ModelConfig>
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for ProviderBuilder<P>
impl<P> RefUnwindSafe for ProviderBuilder<P>where
P: RefUnwindSafe,
impl<P> Send for ProviderBuilder<P>where
P: Send,
impl<P> Sync for ProviderBuilder<P>where
P: Sync,
impl<P> Unpin for ProviderBuilder<P>where
P: Unpin,
impl<P> UnwindSafe for ProviderBuilder<P>where
P: UnwindSafe,
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