pub enum EvalOutcome<Output> {
Pass(Output),
Fail(Output),
Invalid(String),
}Available on crate feature
experimental only.Expand description
The outcome of an evaluation (ie, sending an input to an LLM which then gets tested against a set of criteria). Invalid results due to things like functions returning errors should be encoded as invalid evaluation outcomes.
Variants§
Pass(Output)
Evaluation passed
Fail(Output)
Evaluation failed
Invalid(String)
Evaluation was invalidated (reason in field)
Implementations§
Trait Implementations§
Source§impl<Output: Clone> Clone for EvalOutcome<Output>
impl<Output: Clone> Clone for EvalOutcome<Output>
Source§fn clone(&self) -> EvalOutcome<Output>
fn clone(&self) -> EvalOutcome<Output>
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<Output: Debug> Debug for EvalOutcome<Output>
impl<Output: Debug> Debug for EvalOutcome<Output>
Source§impl<'de, Output> Deserialize<'de> for EvalOutcome<Output>where
Output: Deserialize<'de>,
impl<'de, Output> Deserialize<'de> for EvalOutcome<Output>where
Output: Deserialize<'de>,
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<Output> Freeze for EvalOutcome<Output>where
Output: Freeze,
impl<Output> RefUnwindSafe for EvalOutcome<Output>where
Output: RefUnwindSafe,
impl<Output> Send for EvalOutcome<Output>where
Output: Send,
impl<Output> Sync for EvalOutcome<Output>where
Output: Sync,
impl<Output> Unpin for EvalOutcome<Output>where
Output: Unpin,
impl<Output> UnwindSafe for EvalOutcome<Output>where
Output: UnwindSafe,
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> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
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> 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