pub struct ToolCallScope<'a> {
pub tools: &'a [Arc<dyn Tool>],
pub assistant: &'a AssistantMessage,
pub messages: &'a [Message],
pub parent: Option<&'a str>,
pub cancel: &'a CancellationToken,
}Expand description
Where a tool call runs: the tools it resolves against, the response and transcript its hooks see, and its cancellation.
Fields§
§tools: &'a [Arc<dyn Tool>]Tools the call may name.
assistant: &'a AssistantMessageThe response that made the call, or that made the calling tool’s call.
messages: &'a [Message]The transcript so far.
parent: Option<&'a str>The tool call that made this call, for calls a tool made.
cancel: &'a CancellationTokenCancels the call.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ToolCallScope<'a>
impl<'a> !UnwindSafe for ToolCallScope<'a>
impl<'a> Forget for ToolCallScope<'a>
impl<'a> Freeze for ToolCallScope<'a>
impl<'a> Send for ToolCallScope<'a>
impl<'a> Sync for ToolCallScope<'a>
impl<'a> Unpin for ToolCallScope<'a>
impl<'a> UnsafeUnpin for ToolCallScope<'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