pub struct LocalValidator { /* private fields */ }Expand description
Validator for semantic response validation
Implementations§
Source§impl LocalValidator
impl LocalValidator
Sourcepub fn new(provider: Arc<dyn Provider>, model_id: impl Into<String>) -> Self
pub fn new(provider: Arc<dyn Provider>, model_id: impl Into<String>) -> Self
Create a new validator
Sourcepub async fn validate(&self, task: &str, response: &str) -> ValidationResult
pub async fn validate(&self, task: &str, response: &str) -> ValidationResult
Validate a response for the given task
Performs semantic validation to catch issues that pattern matching might miss.
Sourcepub fn validate_heuristic(&self, task: &str, response: &str) -> ValidationResult
pub fn validate_heuristic(&self, task: &str, response: &str) -> ValidationResult
Quick heuristic validation (no LLM call)
Use for fast pre-filtering before LLM validation.
Auto Trait Implementations§
impl Freeze for LocalValidator
impl !RefUnwindSafe for LocalValidator
impl Send for LocalValidator
impl Sync for LocalValidator
impl Unpin for LocalValidator
impl UnsafeUnpin for LocalValidator
impl !UnwindSafe for LocalValidator
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