pub struct ThinkResult {
pub converged: bool,
pub steps: usize,
pub final_error: f64,
pub memory_snapshot: Vec<String>,
pub signals: Vec<CognitionSignal>,
}Expand description
The outcome of one crate::agent::LmmAgent::think() invocation.
Returned by the closed-loop [crate::cognition::r#loop::ThinkLoop] controller.
§Examples
#[tokio::main]
async fn main() {
use lmm_agent::agent::LmmAgent;
let mut agent = LmmAgent::new("Tester".into(), "Test.".into());
let result = agent.think("What is Rust ownership?").await.unwrap();
assert!(result.steps > 0);
}Fields§
§converged: booltrue when the Jaccard error fell below the convergence threshold.
steps: usizeNumber of feedback iterations executed.
final_error: f64Final Jaccard distance between goal and last observation, ∈ [0, 1].
memory_snapshot: Vec<String>Snapshot of hot-store contents at termination (newest-first).
signals: Vec<CognitionSignal>The per-step signals produced during the run.
Trait Implementations§
Source§impl Clone for ThinkResult
impl Clone for ThinkResult
Source§fn clone(&self) -> ThinkResult
fn clone(&self) -> ThinkResult
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 ThinkResult
impl Debug for ThinkResult
Source§impl PartialEq for ThinkResult
impl PartialEq for ThinkResult
impl StructuralPartialEq for ThinkResult
Auto Trait Implementations§
impl Freeze for ThinkResult
impl RefUnwindSafe for ThinkResult
impl Send for ThinkResult
impl Sync for ThinkResult
impl Unpin for ThinkResult
impl UnsafeUnpin for ThinkResult
impl UnwindSafe for ThinkResult
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