pub struct OpenAiCompatible { /* private fields */ }Implementations§
Source§impl OpenAiCompatible
impl OpenAiCompatible
pub fn from_config(cfg: &ProviderConfig) -> Result<Self>
Trait Implementations§
Source§impl Provider for OpenAiCompatible
impl Provider for OpenAiCompatible
Source§fn default_model(&self) -> &str
fn default_model(&self) -> &str
Model used when the caller doesn’t name one.
Source§fn complete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 CompletionRequest,
sink: Option<&'life2 StreamSink>,
) -> Pin<Box<dyn Future<Output = Result<CompletionResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn complete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 CompletionRequest,
sink: Option<&'life2 StreamSink>,
) -> Pin<Box<dyn Future<Output = Result<CompletionResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Run one turn. With
sink, stream and emit deltas as they arrive; the
accumulated response is still returned.Auto Trait Implementations§
impl !RefUnwindSafe for OpenAiCompatible
impl !UnwindSafe for OpenAiCompatible
impl Freeze for OpenAiCompatible
impl Send for OpenAiCompatible
impl Sync for OpenAiCompatible
impl Unpin for OpenAiCompatible
impl UnsafeUnpin for OpenAiCompatible
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