pub struct RawProvider { /* private fields */ }
Implementations§
Source§impl RawProvider
impl RawProvider
pub fn new(config: OpenAIConfig) -> Self
Trait Implementations§
Source§impl Clone for RawProvider
impl Clone for RawProvider
Source§fn clone(&self) -> RawProvider
fn clone(&self) -> RawProvider
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RawProvider
impl Debug for RawProvider
Source§impl Default for RawProvider
impl Default for RawProvider
Source§fn default() -> RawProvider
fn default() -> RawProvider
Returns the “default value” for a type. Read more
Source§impl Provider for RawProvider
impl Provider for RawProvider
type Config = OpenAIConfig
type ChatRequest = Value
type ChatResponse = Value
type ChatResponseStream = Value
fn config(&self) -> &Self::Config
fn chat<'life0, 'life1, 'async_trait>(
&'life0 self,
client: &'life1 (impl 'async_trait + HttpClient),
request: Self::ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<Self::ChatResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn chat_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
client: &'life1 (impl 'async_trait + HttpClient),
request: Self::ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Self::ChatResponseStream, Error>> + Send>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn completions<'life0, 'life1, 'async_trait>(
&'life0 self,
client: &'life1 (impl 'async_trait + HttpClient),
request: CompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<CompletionResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for RawProvider
impl RefUnwindSafe for RawProvider
impl Send for RawProvider
impl Sync for RawProvider
impl Unpin for RawProvider
impl UnwindSafe for RawProvider
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