pub struct Trajectory {
pub id: String,
pub steps: Vec<TrajectoryStep>,
pub verdict: Verdict,
pub domain: String,
pub created_at: DateTime<Utc>,
pub embedding: Option<EmbeddingVector>,
}Expand description
A trajectory — a sequence of steps with a final verdict.
Fields§
§id: StringUnique ID.
steps: Vec<TrajectoryStep>Ordered steps.
verdict: VerdictFinal verdict.
domain: StringDomain or task type.
created_at: DateTime<Utc>Creation timestamp.
embedding: Option<EmbeddingVector>Embedding of the trajectory’s combined input text.
Implementations§
Source§impl Trajectory
impl Trajectory
Sourcepub fn new(steps: Vec<TrajectoryStep>, verdict: Verdict, domain: &str) -> Self
pub fn new(steps: Vec<TrajectoryStep>, verdict: Verdict, domain: &str) -> Self
Create a new trajectory with the given steps and verdict.
Sourcepub fn total_duration_ms(&self) -> u64
pub fn total_duration_ms(&self) -> u64
Total duration across all steps.
Sourcepub fn avg_confidence(&self) -> f32
pub fn avg_confidence(&self) -> f32
Average confidence across all steps.
Sourcepub fn input_text(&self) -> String
pub fn input_text(&self) -> String
Concatenated input text for embedding.
Trait Implementations§
Source§impl Clone for Trajectory
impl Clone for Trajectory
Source§fn clone(&self) -> Trajectory
fn clone(&self) -> Trajectory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Trajectory
impl Debug for Trajectory
Source§impl<'de> Deserialize<'de> for Trajectory
impl<'de> Deserialize<'de> for Trajectory
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 Trajectory
impl RefUnwindSafe for Trajectory
impl Send for Trajectory
impl Sync for Trajectory
impl Unpin for Trajectory
impl UnsafeUnpin for Trajectory
impl UnwindSafe for Trajectory
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