pub trait ModelRunner {
// Required methods
fn fingerprint(&self) -> &ModelFingerprint;
fn run(&self, req: &ModelRequest) -> Result<ModelResponse>;
}Expand description
Anything that can turn a request into a response under a fixed fingerprint.
Required Methods§
Sourcefn fingerprint(&self) -> &ModelFingerprint
fn fingerprint(&self) -> &ModelFingerprint
The pinned identity of this runner (model, params, provider).
Sourcefn run(&self, req: &ModelRequest) -> Result<ModelResponse>
fn run(&self, req: &ModelRequest) -> Result<ModelResponse>
Executes one request. Implementations must be deterministic given the same fingerprint.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".