pub struct OpenAIProvider { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Provider for OpenAIProvider
impl Provider for OpenAIProvider
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 OpenAIProvider
impl !RefUnwindSafe for OpenAIProvider
impl Send for OpenAIProvider
impl Sync for OpenAIProvider
impl Unpin for OpenAIProvider
impl UnsafeUnpin for OpenAIProvider
impl !UnwindSafe for OpenAIProvider
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