pub struct ToolLoopOutcome {
pub converged: bool,
pub turns_used: u32,
pub max_turns: u32,
pub tool_calls: Vec<ToolCallObservation>,
pub failure_class: Option<FailureClass>,
pub final_answer: Option<String>,
}Expand description
Outcome of one tool-loop run.
Security contract: this struct has NO field for tool outputs or prompts -
only tool-call observations and the (truncated) final answer. The final
answer is capped at MAX_EXCERPT_CHARS (512) characters, char-safe.
Fields§
§converged: bool§turns_used: u32Assistant turns actually issued (each assistant message plus its tool executions counts as one turn).
max_turns: u32§tool_calls: Vec<ToolCallObservation>§failure_class: Option<FailureClass>§final_answer: Option<String>The model’s final answer when one was given, truncated to 512 chars.
Implementations§
Source§impl ToolLoopOutcome
impl ToolLoopOutcome
Sourcepub fn new(
converged: bool,
turns_used: u32,
max_turns: u32,
tool_calls: Vec<ToolCallObservation>,
failure_class: Option<FailureClass>,
final_answer: Option<String>,
) -> Self
pub fn new( converged: bool, turns_used: u32, max_turns: u32, tool_calls: Vec<ToolCallObservation>, failure_class: Option<FailureClass>, final_answer: Option<String>, ) -> Self
Build an outcome, truncating the final answer to
MAX_EXCERPT_CHARS characters (char-safe: never splits a UTF-8
scalar mid-sequence).
Trait Implementations§
Source§impl Clone for ToolLoopOutcome
impl Clone for ToolLoopOutcome
Source§fn clone(&self) -> ToolLoopOutcome
fn clone(&self) -> ToolLoopOutcome
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 ToolLoopOutcome
impl Debug for ToolLoopOutcome
Source§impl<'de> Deserialize<'de> for ToolLoopOutcome
impl<'de> Deserialize<'de> for ToolLoopOutcome
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
Source§impl PartialEq for ToolLoopOutcome
impl PartialEq for ToolLoopOutcome
Source§impl Serialize for ToolLoopOutcome
impl Serialize for ToolLoopOutcome
impl StructuralPartialEq for ToolLoopOutcome
Auto Trait Implementations§
impl Freeze for ToolLoopOutcome
impl RefUnwindSafe for ToolLoopOutcome
impl Send for ToolLoopOutcome
impl Sync for ToolLoopOutcome
impl Unpin for ToolLoopOutcome
impl UnsafeUnpin for ToolLoopOutcome
impl UnwindSafe for ToolLoopOutcome
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