pub struct OpenAIClient { /* private fields */ }Expand description
ChatCompletion client using your wrapped Request.
Implementations§
Trait Implementations§
Source§impl ModelSDK for OpenAIClient
 
impl ModelSDK for OpenAIClient
Source§fn chat_once<'life0, 'async_trait>(
    &'life0 self,
    messages: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn chat_once<'life0, 'async_trait>(
    &'life0 self,
    messages: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Send a chat request and get full response.
Source§fn chat_stream<'life0, 'async_trait>(
    &'life0 self,
    messages: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<ByteStream>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
 
fn chat_stream<'life0, 'async_trait>(
    &'life0 self,
    messages: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<ByteStream>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,
Send a chat request and get response stream (SSE).
type Input = ChatMessages
type Output = ChatResponse
Auto Trait Implementations§
impl Freeze for OpenAIClient
impl !RefUnwindSafe for OpenAIClient
impl Send for OpenAIClient
impl Sync for OpenAIClient
impl Unpin for OpenAIClient
impl !UnwindSafe for OpenAIClient
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