pub trait LLMInterface {
// Required methods
fn send_request<T: FromLLMResponse + Send + Sync>(
&self,
sys_prompt: &str,
user_prompt: &str,
) -> impl Future<Output = Result<T>>;
fn upload_file(
&self,
file_path: PathBuf,
) -> impl Future<Output = Result<Value>>;
fn create_fine_tuning_job(
&self,
training_file: &str,
) -> impl Future<Output = Result<Value>>;
fn train(&self, file_path: PathBuf) -> impl Future<Output = Result<()>>;
}Required Methods§
fn send_request<T: FromLLMResponse + Send + Sync>( &self, sys_prompt: &str, user_prompt: &str, ) -> impl Future<Output = Result<T>>
fn upload_file(&self, file_path: PathBuf) -> impl Future<Output = Result<Value>>
fn create_fine_tuning_job( &self, training_file: &str, ) -> impl Future<Output = Result<Value>>
fn train(&self, file_path: PathBuf) -> impl Future<Output = Result<()>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".