pub trait InferenceRpc: Send + Sync {
Show 32 methods
// Required methods
fn generate_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 GenerationRequest,
) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn model_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ModelInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn is_ready<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn apply_chat_template<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ChatTemplateRequest,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn create_lora<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 LoraConfig,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_lora<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save_lora<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn unload_lora<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn has_lora<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_session<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn clear_session<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn release_session<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HealthStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn ttt_writeback<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn ttt_evict<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn train_step<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 TrainStepRequest,
) -> Pin<Box<dyn Future<Output = Result<TrainStepResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn ttt_zero<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_delta_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DeltaStatusResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn save_adaptation<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 SaveAdaptationRequest,
) -> Pin<Box<dyn Future<Output = Result<SaveAdaptationResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn snapshot_delta<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SnapshotDeltaResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn train_step_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 TrainStepRequest,
) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn export_peft_adapter<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ExportPeftRequest,
) -> Pin<Box<dyn Future<Output = Result<ExportPeftResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn merge_lora<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 MergeLoraRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn create_lora_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 LoraConfig,
) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_lora_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save_lora_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save_adaptation_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 SaveAdaptationRequest,
) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn snapshot_delta_stream<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn export_peft_adapter_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ExportPeftRequest,
) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn merge_lora_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 MergeLoraRequest,
) -> Pin<Box<dyn Future<Output = Result<MoqStreamHandle>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn embed<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 EmbedImagesRequest,
) -> Pin<Box<dyn Future<Output = Result<EmbedImagesResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_layer_profile<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<LayerProfileResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generated RPC trait for the Inference service.