Skip to main content

LLMInterface

Trait LLMInterface 

Source
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§

Source

fn send_request<T: FromLLMResponse + Send + Sync>( &self, sys_prompt: &str, user_prompt: &str, ) -> impl Future<Output = Result<T>>

Source

fn upload_file(&self, file_path: PathBuf) -> impl Future<Output = Result<Value>>

Source

fn create_fine_tuning_job( &self, training_file: &str, ) -> impl Future<Output = Result<Value>>

Source

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".

Implementors§