pub struct OpenAiEngine {
pub endpoint: String,
pub model: String,
pub client: Client,
}Fields§
§endpoint: String§model: String§client: ClientTrait Implementations§
Source§impl InferenceEngine for OpenAiEngine
impl InferenceEngine for OpenAiEngine
fn generate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
system_prompt: &'life1 str,
prompt_payload: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for OpenAiEngine
impl !UnwindSafe for OpenAiEngine
impl Freeze for OpenAiEngine
impl Send for OpenAiEngine
impl Sync for OpenAiEngine
impl Unpin for OpenAiEngine
impl UnsafeUnpin for OpenAiEngine
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