pub struct ReActStep {
pub thought: String,
pub action: String,
pub observation: String,
pub step_duration_ms: u64,
}Expand description
A single ReAct step: Thought → Action → Observation.
Fields§
§thought: StringAgent’s reasoning about the current state.
action: StringThe action taken (tool name + JSON arguments, or “FINAL_ANSWER”).
observation: StringThe result of the action.
step_duration_ms: u64Wall-clock duration of this individual step in milliseconds. Covers the time from the start of the inference call to the end of the tool invocation (or FINAL_ANSWER detection). Zero for steps that were constructed outside the loop (e.g., in tests).
Implementations§
Source§impl ReActStep
impl ReActStep
Sourcepub fn is_final_answer(&self) -> bool
pub fn is_final_answer(&self) -> bool
Returns true if this step’s action is a FINAL_ANSWER.
Sourcepub fn is_tool_call(&self) -> bool
pub fn is_tool_call(&self) -> bool
Returns true if this step’s action is a tool call (not a FINAL_ANSWER).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ReActStep
impl<'de> Deserialize<'de> for ReActStep
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 ReActStep
impl RefUnwindSafe for ReActStep
impl Send for ReActStep
impl Sync for ReActStep
impl Unpin for ReActStep
impl UnsafeUnpin for ReActStep
impl UnwindSafe for ReActStep
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