#[non_exhaustive]pub struct ToolCallContext {
pub call_block_id: BlockId,
pub input: ToolCallPayload,
pub result_notes: Vec<TextPayload>,
}Expand description
Identity of one tool dispatch, handed to Tool::execute.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.call_block_id: BlockIdThe declaration block whose result this dispatch produces.
input: ToolCallPayloadThe effective input after any pre-processing edits.
result_notes: Vec<TextPayload>Notes added before execution. ToolBatch::resolve_at prepends these
to the returned result’s notes; tool implementations should return
only notes they add and must not copy this field into the result.
Implementations§
Source§impl ToolCallContext
impl ToolCallContext
Sourcepub fn new(call_block_id: BlockId, input: ToolCallPayload) -> Self
pub fn new(call_block_id: BlockId, input: ToolCallPayload) -> Self
A call context with no result notes.
Source§impl ToolCallContext
impl ToolCallContext
Sourcepub fn from_declaration(
call_block_id: BlockId,
declaration: &ToolCallPayload,
) -> Self
pub fn from_declaration( call_block_id: BlockId, declaration: &ToolCallPayload, ) -> Self
Builds execution material from a committed declaration.
Trait Implementations§
Source§impl Clone for ToolCallContext
impl Clone for ToolCallContext
Auto Trait Implementations§
impl Freeze for ToolCallContext
impl RefUnwindSafe for ToolCallContext
impl Send for ToolCallContext
impl Sync for ToolCallContext
impl Unpin for ToolCallContext
impl UnsafeUnpin for ToolCallContext
impl UnwindSafe for ToolCallContext
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