pub struct Ai21Builder { /* private fields */ }Implementations§
Source§impl Ai21Builder
impl Ai21Builder
pub fn new() -> Self
pub fn with_base_url(self, base_url: &str) -> Self
pub fn with_proxy(self, proxy_url: Option<&str>) -> Self
pub fn without_proxy(self) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_pool_config(self, max_idle: usize, idle_timeout: Duration) -> Self
pub fn with_metrics(self, metrics: Arc<dyn Metrics>) -> Self
pub fn with_default_chat_model(self, model: &str) -> Self
pub fn with_default_multimodal_model(self, model: &str) -> Self
pub fn with_smart_defaults(self) -> Self
pub fn for_production(self) -> Self
pub fn for_development(self) -> Self
pub fn with_max_concurrency(self, max: usize) -> Self
pub fn with_resilience_config(self, config: ResilienceConfig) -> Self
pub fn with_strategy(self, strategy: Box<dyn ChatProvider>) -> Self
pub fn build(self) -> Result<AiClient, AiLibError>
pub fn build_provider(self) -> Result<Box<dyn ChatProvider>, AiLibError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ai21Builder
impl !RefUnwindSafe for Ai21Builder
impl Send for Ai21Builder
impl Sync for Ai21Builder
impl Unpin for Ai21Builder
impl !UnwindSafe for Ai21Builder
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more