pub enum NousEvent {
InlineCompleted {
evaluator: String,
score: f64,
label: ScoreLabel,
layer: EvalLayer,
session_id: String,
run_id: Option<String>,
explanation: Option<String>,
},
AsyncCompleted {
evaluator: String,
scores: Vec<ScoreSummary>,
session_id: String,
run_id: Option<String>,
duration_ms: u64,
},
QualityChanged {
session_id: String,
aggregate_quality: f64,
trend: f64,
inline_count: u32,
async_count: u32,
},
EgriOutcome {
session_id: String,
trial_id: Option<String>,
outcome: Value,
},
}Expand description
Nous-specific event types that wrap as EventKind::Custom.
Variants§
InlineCompleted
An inline evaluator completed.
Fields
§
label: ScoreLabelAsyncCompleted
An async evaluator completed.
Fields
§
scores: Vec<ScoreSummary>QualityChanged
Aggregate quality changed (emitted when EMA updates).
EgriOutcome
EGRI outcome published after async judge evaluation.
Implementations§
Source§impl NousEvent
impl NousEvent
Sourcepub fn from_inline_score(score: &EvalScore) -> Self
pub fn from_inline_score(score: &EvalScore) -> Self
Create an inline-completed event from an EvalScore.
Sourcepub fn into_event_kind(self) -> EventKind
pub fn into_event_kind(self) -> EventKind
Convert this event into a canonical EventKind::Custom.
Sourcepub fn is_eval_event(event_type: &str) -> bool
pub fn is_eval_event(event_type: &str) -> bool
Check if a Custom event is a Nous evaluation event by its prefix.
Sourcepub fn from_custom(event_type: &str, data: &Value) -> Option<Self>
pub fn from_custom(event_type: &str, data: &Value) -> Option<Self>
Try to parse an EventKind::Custom back into a NousEvent.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NousEvent
impl<'de> Deserialize<'de> for NousEvent
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 NousEvent
impl RefUnwindSafe for NousEvent
impl Send for NousEvent
impl Sync for NousEvent
impl Unpin for NousEvent
impl UnsafeUnpin for NousEvent
impl UnwindSafe for NousEvent
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