pub struct ClientConfigBuilder { /* private fields */ }Expand description
Builder for client configuration
Implementations§
Source§impl ClientConfigBuilder
impl ClientConfigBuilder
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 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 build(self) -> RsllmResult<ClientConfig>
pub fn build(self) -> RsllmResult<ClientConfig>
Build the configuration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClientConfigBuilder
impl RefUnwindSafe for ClientConfigBuilder
impl Send for ClientConfigBuilder
impl Sync for ClientConfigBuilder
impl Unpin for ClientConfigBuilder
impl UnwindSafe for ClientConfigBuilder
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