pub struct MockLlmClassifier {
pub default_hs_code: String,
pub default_confidence: f32,
}Expand description
Deterministic mock LLM classifier for unit tests.
Resolution order:
- If the prompt contains a SMILES analysis with a 4-digit heading hint,
return that heading padded to 6 digits (
XXXX00) with confidence from the SMILES engine. - Otherwise return the configured
default_hs_code(default:"999999").
The mock never makes a network call and is fully Send + Sync.
Fields§
§default_hs_code: StringHS code returned when no SMILES heading hint is available.
default_confidence: f32Confidence for the default code.
Implementations§
Trait Implementations§
Source§impl Clone for MockLlmClassifier
impl Clone for MockLlmClassifier
Source§fn clone(&self) -> MockLlmClassifier
fn clone(&self) -> MockLlmClassifier
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MockLlmClassifier
impl Debug for MockLlmClassifier
Source§impl Default for MockLlmClassifier
impl Default for MockLlmClassifier
Source§impl LlmClassifier for MockLlmClassifier
impl LlmClassifier for MockLlmClassifier
Auto Trait Implementations§
impl Freeze for MockLlmClassifier
impl RefUnwindSafe for MockLlmClassifier
impl Send for MockLlmClassifier
impl Sync for MockLlmClassifier
impl Unpin for MockLlmClassifier
impl UnsafeUnpin for MockLlmClassifier
impl UnwindSafe for MockLlmClassifier
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