pub struct LlmClientBuilder { /* private fields */ }Implementations§
Source§impl LlmClientBuilder
impl LlmClientBuilder
pub fn new( provider: LlmProvider, api_key: impl Into<String>, model: impl Into<String>, ) -> Self
pub fn from_env() -> Option<Self>
pub fn base_url(self, base_url: impl Into<String>) -> Self
pub fn build(self) -> Arc<dyn LlmClient> ⓘ
Sourcepub fn build_stream_client(self) -> Arc<dyn StreamClient> ⓘ
pub fn build_stream_client(self) -> Arc<dyn StreamClient> ⓘ
Build an Arc<dyn StreamClient>.
Use this for providers that implement StreamClient directly
(e.g. OpenAiResponsesClient) rather than the legacy LlmClient trait.
Auto Trait Implementations§
impl Freeze for LlmClientBuilder
impl RefUnwindSafe for LlmClientBuilder
impl Send for LlmClientBuilder
impl Sync for LlmClientBuilder
impl Unpin for LlmClientBuilder
impl UnsafeUnpin for LlmClientBuilder
impl UnwindSafe for LlmClientBuilder
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