pub struct ClientBuilder { /* private fields */ }Expand description
Client builder for fluent configuration
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn base_url(self, base_url: impl AsRef<str>) -> RsllmResult<Self>
pub fn base_url(self, base_url: impl AsRef<str>) -> RsllmResult<Self>
Set the base URL
Sourcepub fn organization_id(self, org_id: impl Into<String>) -> Self
pub fn organization_id(self, org_id: impl Into<String>) -> Self
Set the organization ID
Sourcepub fn temperature(self, temperature: f32) -> Self
pub fn temperature(self, temperature: f32) -> Self
Set the temperature
Sourcepub fn max_tokens(self, max_tokens: u32) -> Self
pub fn max_tokens(self, max_tokens: u32) -> Self
Set max tokens
Sourcepub fn header(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn header(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a custom header
Sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
Set retry configuration
Sourcepub fn build(self) -> RsllmResult<Client>
pub fn build(self) -> RsllmResult<Client>
Build the client
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnwindSafe for ClientBuilder
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