pub enum AfterToolDecision {
Continue,
ModifyOutput {
output: ToolOutput,
},
StopTurn {
reason: String,
final_output: Option<String>,
},
}Expand description
Decision returned by an after_tool_call hook.
Variants§
Continue
Keep the recorded tool result unchanged and continue the turn.
ModifyOutput
Replace the tool output before committing it to the durable session transcript.
Fields
§
output: ToolOutputReplacement tool output.
StopTurn
Commit this tool result, settle any remaining pending calls cleanly, and stop the turn.
Implementations§
Source§impl AfterToolDecision
impl AfterToolDecision
Sourcepub const fn continue_normally() -> Self
pub const fn continue_normally() -> Self
Keeps the tool output unchanged.
Sourcepub fn modify_output(output: ToolOutput) -> Self
pub fn modify_output(output: ToolOutput) -> Self
Replaces the tool output before durable commit.
Trait Implementations§
Source§impl Clone for AfterToolDecision
impl Clone for AfterToolDecision
Source§impl Debug for AfterToolDecision
impl Debug for AfterToolDecision
Source§impl<'de> Deserialize<'de> for AfterToolDecision
impl<'de> Deserialize<'de> for AfterToolDecision
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
impl Eq for AfterToolDecision
Source§impl PartialEq for AfterToolDecision
impl PartialEq for AfterToolDecision
Source§impl Serialize for AfterToolDecision
impl Serialize for AfterToolDecision
impl StructuralPartialEq for AfterToolDecision
Auto Trait Implementations§
impl Forget for AfterToolDecision
impl Freeze for AfterToolDecision
impl Move for AfterToolDecision
impl RefUnwindSafe for AfterToolDecision
impl Send for AfterToolDecisionwhere
RawVecInner: Send,
impl Sync for AfterToolDecisionwhere
RawVecInner: Sync,
impl Unpin for AfterToolDecision
impl UnsafeUnpin for AfterToolDecision
impl UnwindSafe for AfterToolDecisionwhere
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.