pub struct ModelClientBuilder { /* private fields */ }Expand description
A builder for creating a ModelClient.
Implementations§
Source§impl ModelClientBuilder
impl ModelClientBuilder
Sourcepub fn base_url(self, base_url: impl Into<String>) -> Self
pub fn base_url(self, base_url: impl Into<String>) -> Self
Set the base URL for the Ollama API.
Defaults to http://localhost:11434 for local instances.
Use https://ollama.com for cloud access.
Sourcepub fn auth_token(self, token: String) -> Self
pub fn auth_token(self, token: String) -> Self
Set an authentication token for cloud access.
Required when accessing cloud-hosted models, publishing models, or downloading private models.
Sourcepub fn build(self) -> Result<ModelClient>
pub fn build(self) -> Result<ModelClient>
Build the ModelClient.
Trait Implementations§
Source§impl Clone for ModelClientBuilder
impl Clone for ModelClientBuilder
Source§fn clone(&self) -> ModelClientBuilder
fn clone(&self) -> ModelClientBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelClientBuilder
impl Debug for ModelClientBuilder
Auto Trait Implementations§
impl Freeze for ModelClientBuilder
impl RefUnwindSafe for ModelClientBuilder
impl Send for ModelClientBuilder
impl Sync for ModelClientBuilder
impl Unpin for ModelClientBuilder
impl UnsafeUnpin for ModelClientBuilder
impl UnwindSafe for ModelClientBuilder
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