pub struct CurrentContext {
pub user_query: String,
pub plan: Plan,
pub history: Vec<ThoughtActionObservation>,
pub iteration: usize,
}Expand description
The complete context for a ReAct session.
This model tracks everything needed to maintain state throughout the reasoning and acting loop, including the user’s query, the plan, the history of actions, and the iteration count.
Fields§
§user_query: StringThe user query to which we are responding.
plan: PlanThe current plan of action for the current context.
history: Vec<ThoughtActionObservation>The history of actions taken and observations made in the current context.
iteration: usizeThe number of iterations taken in the current context.
Implementations§
Trait Implementations§
Source§impl Clone for CurrentContext
impl Clone for CurrentContext
Source§fn clone(&self) -> CurrentContext
fn clone(&self) -> CurrentContext
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 CurrentContext
impl Debug for CurrentContext
Source§impl<'de> Deserialize<'de> for CurrentContext
impl<'de> Deserialize<'de> for CurrentContext
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 CurrentContext
impl RefUnwindSafe for CurrentContext
impl Send for CurrentContext
impl Sync for CurrentContext
impl Unpin for CurrentContext
impl UnwindSafe for CurrentContext
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