pub trait AIConnector: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn build_request(
&self,
trace: &Trace,
api_key: &str,
) -> Result<AIRequest, TramexError>;
fn parse_response(&self, response_body: &str) -> Result<String, TramexError>;
}Expand description
Trait abstracting an AI chatbot connector.
Implementations build the HTTP request and parse the response. The actual HTTP call is handled by the UI layer (using ehttp).