pub trait SafetySteerer {
// Required methods
fn adjust(&self, recent_tokens: &[u32]) -> LogitAdjustment;
fn mode(&self) -> SafetyMode;
}Expand description
Per-step safety intervention. The runtime applies this after the grammar mask and before sampling.
Required Methods§
fn adjust(&self, recent_tokens: &[u32]) -> LogitAdjustment
fn mode(&self) -> SafetyMode
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".