pub struct TwoPassConfig {
pub accept_threshold: f32,
pub min_comfortable_chars: usize,
pub max_comfortable_chars: usize,
pub source_lang: String,
pub target_lang: String,
}Expand description
Configuration for draft_and_route: the routing threshold, the length
comfort band, and the source/target language hints used only to frame the
draft prompt.
Serializable so a caller can load it from its own config format.
Fields§
§accept_threshold: f32A segment whose combined confidence is greater than or equal to
this is Decision::AcceptLocal; below it, Decision::SendToCloud.
Defaults to the conservative DEFAULT_ACCEPT_THRESHOLD; raise toward
1.0 to send even more to the cloud, lower it only with measured
evidence to widen the local share.
min_comfortable_chars: usizeThe shortest segment (in chars) that still earns a full length score.
Below this the length score falls off linearly to zero — very short
segments (stray headings, garbage lines) are the least reliable.
max_comfortable_chars: usizeThe longest segment (in chars) that still earns a full length score.
Above this the length score decays — very long segments give a small
model the most room to drift.
source_lang: StringSource-language hint for the draft prompt (e.g. "Chinese"). Framing
only; the deterministic stub adapter ignores it.
target_lang: StringTarget-language hint for the draft prompt (e.g. "English").
Trait Implementations§
Source§impl Clone for TwoPassConfig
impl Clone for TwoPassConfig
Source§fn clone(&self) -> TwoPassConfig
fn clone(&self) -> TwoPassConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more