pub struct EvalResult {
pub score: f64,
pub passed: bool,
pub reasoning: Option<String>,
}Expand description
Result of a single evaluation.
Fields§
§score: f64Score between 0.0 and 1.0.
passed: boolWhether the evaluation passed.
reasoning: Option<String>Optional reasoning for the result.
Implementations§
Source§impl EvalResult
impl EvalResult
Sourcepub fn with_score(score: f64) -> Self
pub fn with_score(score: f64) -> Self
Create a result with a specific score. Passes if score >= 0.5.
Sourcepub fn with_reasoning(self, reasoning: impl Into<String>) -> Self
pub fn with_reasoning(self, reasoning: impl Into<String>) -> Self
Attach reasoning to this result.
Trait Implementations§
Source§impl Clone for EvalResult
impl Clone for EvalResult
Source§fn clone(&self) -> EvalResult
fn clone(&self) -> EvalResult
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 EvalResult
impl Debug for EvalResult
Source§impl<'de> Deserialize<'de> for EvalResult
impl<'de> Deserialize<'de> for EvalResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EvalResult
impl RefUnwindSafe for EvalResult
impl Send for EvalResult
impl Sync for EvalResult
impl Unpin for EvalResult
impl UnsafeUnpin for EvalResult
impl UnwindSafe for EvalResult
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