pub struct OpenAIClient { /* private fields */ }Expand description
OpenAI API client
Implementations§
Source§impl OpenAIClient
impl OpenAIClient
Trait Implementations§
Source§impl LLMClient for OpenAIClient
impl LLMClient for OpenAIClient
Source§fn chat<'life0, 'life1, 'async_trait>(
&'life0 self,
messages: Vec<Message>,
tools: Vec<ToolDefinition>,
model: Option<&'life1 str>,
json_mode: bool,
) -> Pin<Box<dyn Future<Output = GentResult<LLMResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn chat<'life0, 'life1, 'async_trait>(
&'life0 self,
messages: Vec<Message>,
tools: Vec<ToolDefinition>,
model: Option<&'life1 str>,
json_mode: bool,
) -> Pin<Box<dyn Future<Output = GentResult<LLMResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send a chat request to the LLM Read more
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