pub struct OpenAIConnector { /* private fields */ }Expand description
OpenAI (ChatGPT) connector
Implementations§
Source§impl OpenAIConnector
impl OpenAIConnector
Sourcepub fn with_model(model: &str) -> Self
pub fn with_model(model: &str) -> Self
Create an OpenAIConnector with a specific model
Trait Implementations§
Source§impl AIConnector for OpenAIConnector
impl AIConnector for OpenAIConnector
Source§fn build_request(
&self,
trace: &Trace,
api_key: &str,
) -> Result<AIRequest, TramexError>
fn build_request( &self, trace: &Trace, api_key: &str, ) -> Result<AIRequest, TramexError>
Build the HTTP request for explaining a trace. Read more
Source§fn parse_response(&self, response_body: &str) -> Result<String, TramexError>
fn parse_response(&self, response_body: &str) -> Result<String, TramexError>
Parse the API response body into a human-readable explanation. Read more
Auto Trait Implementations§
impl Freeze for OpenAIConnector
impl RefUnwindSafe for OpenAIConnector
impl Send for OpenAIConnector
impl Sync for OpenAIConnector
impl Unpin for OpenAIConnector
impl UnwindSafe for OpenAIConnector
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