pub struct AnthropicProvider { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Provider for AnthropicProvider
impl Provider for AnthropicProvider
Source§fn context_size(&self) -> Option<u32>
fn context_size(&self) -> Option<u32>
Best-effort context window size (in tokens) for the configured model.
None if the provider cannot infer it; callers should treat that as
“don’t render a fullness bar”.fn chat<'life0, 'async_trait>(
&'life0 self,
request: ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn chat_stream<'life0, 'async_trait>(
&'life0 self,
request: ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<Receiver<StreamEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn chat_stream<'life0, 'async_trait>(
&'life0 self,
request: ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<Receiver<StreamEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stream a chat turn. Default impl wraps
chat and emits one Done event,
so providers without native streaming still work (no incremental thinking).Auto Trait Implementations§
impl Freeze for AnthropicProvider
impl !RefUnwindSafe for AnthropicProvider
impl Send for AnthropicProvider
impl Sync for AnthropicProvider
impl Unpin for AnthropicProvider
impl UnsafeUnpin for AnthropicProvider
impl !UnwindSafe for AnthropicProvider
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