pub trait ChatCompletion:
Send
+ Sync
+ DynClone {
// Required method
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatCompletionResponse, ChatCompletionError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Required Methods§
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatCompletionResponse, ChatCompletionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Trait Implementations§
Source§impl ChatCompletion for &dyn ChatCompletion
impl ChatCompletion for &dyn ChatCompletion
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatCompletionResponse, ChatCompletionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl ChatCompletion for Box<dyn ChatCompletion>
impl ChatCompletion for Box<dyn ChatCompletion>
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatCompletionResponse, ChatCompletionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Implementations on Foreign Types§
Source§impl ChatCompletion for Box<dyn ChatCompletion>
impl ChatCompletion for Box<dyn ChatCompletion>
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatCompletionResponse, ChatCompletionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl<T> ChatCompletion for &Twhere
T: ChatCompletion + Clone + 'static,
impl<T> ChatCompletion for &Twhere
T: ChatCompletion + Clone + 'static,
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatCompletionResponse, ChatCompletionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Implementors§
impl ChatCompletion for &dyn ChatCompletion
impl ChatCompletion for MockChatCompletion
Available on crate feature
test-utils
only.