pub struct BeforeToolCall<'a> {
pub assistant_message: &'a AssistantMessage,
pub tool_call: &'a ToolCall,
pub args: &'a mut Value,
pub messages: &'a [Message],
pub parent_tool_call_id: Option<&'a str>,
}Expand description
A tool call about to run.
Fields§
§assistant_message: &'a AssistantMessageThe response that made the call.
tool_call: &'a ToolCallThe call as the model made it.
args: &'a mut ValueValidated arguments, which the hook may change. The tool runs with them as they are when the hook returns.
messages: &'a [Message]The transcript so far.
parent_tool_call_id: Option<&'a str>The tool call that made this call, for calls a tool made.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for BeforeToolCall<'a>
impl<'a> Freeze for BeforeToolCall<'a>
impl<'a> RefUnwindSafe for BeforeToolCall<'a>
impl<'a> Send for BeforeToolCall<'a>
impl<'a> Sync for BeforeToolCall<'a>
impl<'a> Unpin for BeforeToolCall<'a>
impl<'a> UnsafeUnpin for BeforeToolCall<'a>
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