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>,
}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).
Trait Implementations§
Source§impl Clone for TranslatorConfig
impl Clone for TranslatorConfig
Source§fn clone(&self) -> TranslatorConfig
fn clone(&self) -> TranslatorConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TranslatorConfig
impl Debug for TranslatorConfig
Auto Trait Implementations§
impl Freeze for TranslatorConfig
impl RefUnwindSafe for TranslatorConfig
impl Send for TranslatorConfig
impl Sync for TranslatorConfig
impl Unpin for TranslatorConfig
impl UnsafeUnpin for TranslatorConfig
impl UnwindSafe for TranslatorConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more