pub struct ExampleValidator {
pub diversity_threshold: f32,
pub strict: bool,
}Expand description
Validator for generated examples
Fields§
§diversity_threshold: f32Minimum diversity score threshold
strict: boolStrict mode - fail on warnings
Implementations§
Source§impl ExampleValidator
impl ExampleValidator
Sourcepub fn with_diversity_threshold(self, threshold: f32) -> Self
pub fn with_diversity_threshold(self, threshold: f32) -> Self
Set diversity threshold
Sourcepub fn validate_example(
&self,
example: &GeneratedExample,
tool: &ToolDocumentation,
) -> ValidationResult
pub fn validate_example( &self, example: &GeneratedExample, tool: &ToolDocumentation, ) -> ValidationResult
Validate a single example against a tool’s documentation
Sourcepub fn validate_batch(
&self,
examples: &[GeneratedExample],
tool: &ToolDocumentation,
) -> Vec<ValidationResult>
pub fn validate_batch( &self, examples: &[GeneratedExample], tool: &ToolDocumentation, ) -> Vec<ValidationResult>
Validate multiple examples and return batch results
Sourcepub fn calculate_diversity(&self, examples: &[GeneratedExample]) -> f32
pub fn calculate_diversity(&self, examples: &[GeneratedExample]) -> f32
Calculate diversity score for a set of examples Returns a score from 0.0 (all identical) to 1.0 (completely diverse)
Sourcepub fn check_diversity(&self, examples: &[GeneratedExample]) -> bool
pub fn check_diversity(&self, examples: &[GeneratedExample]) -> bool
Check if diversity meets threshold
Sourcepub fn parse_command(&self, command: &str) -> Result<ParsedCommand, String>
pub fn parse_command(&self, command: &str) -> Result<ParsedCommand, String>
Parse a command string into components
Supports formats:
skill run tool:name --param=valueskill run skill:tool param=valuetool --flag --param value
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExampleValidator
impl RefUnwindSafe for ExampleValidator
impl Send for ExampleValidator
impl Sync for ExampleValidator
impl Unpin for ExampleValidator
impl UnwindSafe for ExampleValidator
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().