pub struct TranslatorConfig {
pub model_dir: Option<String>,
pub working_directory: Option<String>,
pub execute_threshold: f32,
pub confirm_threshold: f32,
pub cache_config: Option<CacheConfig>,
pub default_limit: u32,
pub languages: Vec<String>,
pub model_dir_override: Option<PathBuf>,
pub allow_unverified_model: bool,
pub allow_model_download: bool,
pub model_cache_dir: Option<PathBuf>,
pub classifier_pool_size: Option<usize>,
}Expand description
Configuration for the Translator.
Fields§
§model_dir: Option<String>Path to model directory (for classifier feature).
Directory should contain: intent_classifier.onnx, tokenizer.json, and optionally
calibration.json or temperature.json for confidence calibration
working_directory: Option<String>Context: current working directory for relative paths.
execute_threshold: f32Custom confidence thresholds.
confirm_threshold: f32§cache_config: Option<CacheConfig>Cache configuration. Set to None to disable caching.
default_limit: u32Default result limit (affects cache key generation).
languages: Vec<String>Languages to restrict searches to (affects cache key generation).
model_dir_override: Option<PathBuf>Optional override for the resolved model directory (NL02 resolver chain entry).
When set, the resolver short-circuits the rest of the lookup chain and uses
this path directly. Distinct from the legacy Self::model_dir field, which
remains in place for backward compatibility.
allow_unverified_model: boolPermit loading a model whose checksums cannot be verified.
Defaults to false. NL04 enforces strict integrity by default; this flag is
the operator escape hatch for development workflows.
allow_model_download: boolPermit fetching the model from the network when not present locally.
Defaults to false. NL03 wires the gated downloader behind this flag.
model_cache_dir: Option<PathBuf>Optional cache directory for downloaded model artifacts.
Defaults to None, in which case NL03 selects a platform-appropriate cache root.
classifier_pool_size: Option<usize>Optional override for the classifier worker pool size.
Defaults to None. NL07 resolves this to the SQRY_NL_CLASSIFIER_POOL_SIZE
environment variable, falling back to 2 workers.
Trait Implementations§
Source§impl Clone for TranslatorConfig
impl Clone for TranslatorConfig
Source§fn clone(&self) -> TranslatorConfig
fn clone(&self) -> TranslatorConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more