mod chat;
mod completions;
mod embeddings;
mod schema;
mod utils;
pub use chat::*;
pub use completions::*;
pub use embeddings::*;
pub use schema::*;
use crate::services::{PredictionService, PredictorService};
#[derive(Clone)]
pub struct OpenAIClient {
pub chat: ChatService,
pub embeddings: EmbeddingService,
}
impl OpenAIClient {
pub fn new(
predictors: PredictorService,
predictions: PredictionService
) -> Self {
let chat = ChatService::new(predictors.clone(), predictions.clone());
let embeddings = EmbeddingService::new(predictors, predictions);
Self { chat, embeddings }
}
}