pub struct ReloadableProvider { /* private fields */ }Expand description
An LLMProvider wrapper that always delegates to the latest provider stored in a shared lock.
This prevents stale provider snapshots after runtime config changes (provider/model/proxy),
while keeping the call sites ergonomic (Arc<dyn LLMProvider>).
Implementations§
Trait Implementations§
Source§impl LLMProvider for ReloadableProvider
impl LLMProvider for ReloadableProvider
Source§fn chat_stream<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
messages: &'life1 [Message],
tools: &'life2 [ToolSchema],
max_output_tokens: Option<u32>,
model: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<LLMStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn chat_stream<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
messages: &'life1 [Message],
tools: &'life2 [ToolSchema],
max_output_tokens: Option<u32>,
model: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<LLMStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Stream chat completion from the LLM Read more
Source§fn chat_stream_with_options<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
messages: &'life1 [Message],
tools: &'life2 [ToolSchema],
max_output_tokens: Option<u32>,
model: &'life3 str,
options: Option<&'life4 LLMRequestOptions>,
) -> Pin<Box<dyn Future<Output = Result<LLMStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn chat_stream_with_options<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
messages: &'life1 [Message],
tools: &'life2 [ToolSchema],
max_output_tokens: Option<u32>,
model: &'life3 str,
options: Option<&'life4 LLMRequestOptions>,
) -> Pin<Box<dyn Future<Output = Result<LLMStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Stream chat completion with optional request-level controls. Read more
Auto Trait Implementations§
impl Freeze for ReloadableProvider
impl !RefUnwindSafe for ReloadableProvider
impl Send for ReloadableProvider
impl Sync for ReloadableProvider
impl Unpin for ReloadableProvider
impl UnsafeUnpin for ReloadableProvider
impl !UnwindSafe for ReloadableProvider
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