pub struct ReflexionEpisode {
pub id: Uuid,
pub task_type: String,
pub goal: String,
pub attempt: String,
pub succeeded: bool,
pub critiques: Vec<Critique>,
pub retry_count: u32,
pub timestamp: DateTime<Utc>,
pub goal_embedding: Option<Vec<f32>>,
}Expand description
A reflexion episode capturing a task attempt and self-critique.
Fields§
§id: UuidUnique identifier.
task_type: StringType of task attempted.
goal: StringOriginal goal or instruction.
attempt: StringWhat the agent actually did/produced.
succeeded: boolWhether the attempt succeeded.
critiques: Vec<Critique>Self-critiques identifying what went wrong.
retry_count: u32Retry count (how many times this was attempted).
timestamp: DateTime<Utc>When this episode occurred.
goal_embedding: Option<Vec<f32>>Embedding of the goal for similarity search.
Implementations§
Source§impl ReflexionEpisode
impl ReflexionEpisode
Sourcepub fn new(
task_type: impl Into<String>,
goal: impl Into<String>,
attempt: impl Into<String>,
succeeded: bool,
) -> Self
pub fn new( task_type: impl Into<String>, goal: impl Into<String>, attempt: impl Into<String>, succeeded: bool, ) -> Self
Create a new reflexion episode.
Sourcepub fn with_critique(self, critique: Critique) -> Self
pub fn with_critique(self, critique: Critique) -> Self
Add a self-critique.
Sourcepub fn with_retry_count(self, count: u32) -> Self
pub fn with_retry_count(self, count: u32) -> Self
Set retry count.
Sourcepub fn with_embedding(self, embedding: Vec<f32>) -> Self
pub fn with_embedding(self, embedding: Vec<f32>) -> Self
Set the goal embedding for similarity search.
Sourcepub fn critique_summary(&self) -> String
pub fn critique_summary(&self) -> String
Get a summary of all critiques.
Trait Implementations§
Source§impl Clone for ReflexionEpisode
impl Clone for ReflexionEpisode
Source§fn clone(&self) -> ReflexionEpisode
fn clone(&self) -> ReflexionEpisode
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 ReflexionEpisode
impl Debug for ReflexionEpisode
Source§impl<'de> Deserialize<'de> for ReflexionEpisode
impl<'de> Deserialize<'de> for ReflexionEpisode
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 ReflexionEpisode
impl RefUnwindSafe for ReflexionEpisode
impl Send for ReflexionEpisode
impl Sync for ReflexionEpisode
impl Unpin for ReflexionEpisode
impl UnsafeUnpin for ReflexionEpisode
impl UnwindSafe for ReflexionEpisode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request