pub struct AfterModelStepContext {
pub session_id: SessionId,
pub model_turn: usize,
pub max_model_turns: usize,
pub assistant_text: Option<String>,
pub pending_tool_names: Vec<ToolName>,
pub is_final_turn: bool,
pub session_usage: Option<SessionUsage>,
}Expand description
Read-only context supplied to an after_model_step hook.
Fields§
§session_id: SessionIdOwning session identity.
model_turn: usizeOne-based model turn index that just finished.
max_model_turns: usizeConfigured turn budget for the current loop.
assistant_text: Option<String>Assistant text produced during this step, when present.
pending_tool_names: Vec<ToolName>Ordered tool names requested by the model in this step (empty if final).
is_final_turn: boolWhether the model completed without requesting further tool calls.
session_usage: Option<SessionUsage>Latest recorded session usage snapshot, when available.
Trait Implementations§
Source§impl Clone for AfterModelStepContext
impl Clone for AfterModelStepContext
Source§impl Debug for AfterModelStepContext
impl Debug for AfterModelStepContext
impl Eq for AfterModelStepContext
Source§impl PartialEq for AfterModelStepContext
impl PartialEq for AfterModelStepContext
Source§impl Serialize for AfterModelStepContext
impl Serialize for AfterModelStepContext
impl StructuralPartialEq for AfterModelStepContext
Auto Trait Implementations§
impl Forget for AfterModelStepContext
impl Freeze for AfterModelStepContext
impl Move for AfterModelStepContext
impl RefUnwindSafe for AfterModelStepContext
impl Send for AfterModelStepContextwhere
RawVecInner: Send,
impl Sync for AfterModelStepContextwhere
RawVecInner: Sync,
impl Unpin for AfterModelStepContext
impl UnsafeUnpin for AfterModelStepContextwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<ToolName>: UnsafeUnpin,
impl UnwindSafe for AfterModelStepContextwhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.