pub struct ToolNode { /* private fields */ }Expand description
Tool node for executing function calls
Extracts tool calls from the last AI message and executes them.
Implementations§
Source§impl ToolNode
impl ToolNode
Sourcepub fn from_config(config: ToolNodeConfig) -> Self
pub fn from_config(config: ToolNodeConfig) -> Self
Create tool node from config
Sourcepub const fn with_error_handling(self, handle: bool) -> Self
pub const fn with_error_handling(self, handle: bool) -> Self
Set error handling mode
Sourcepub const fn with_validation(self, validate: bool) -> Self
pub const fn with_validation(self, validate: bool) -> Self
Enable input validation
Sourcepub fn with_transformer(self, transformer: Box<dyn ToolCallTransformer>) -> Self
pub fn with_transformer(self, transformer: Box<dyn ToolCallTransformer>) -> Self
Set tool call transformer
Sourcepub fn with_interceptor(self, interceptor: Arc<dyn ToolInterceptor>) -> Self
pub fn with_interceptor(self, interceptor: Arc<dyn ToolInterceptor>) -> Self
Set interceptor
Auto Trait Implementations§
impl !RefUnwindSafe for ToolNode
impl !UnwindSafe for ToolNode
impl Freeze for ToolNode
impl Send for ToolNode
impl Sync for ToolNode
impl Unpin for ToolNode
impl UnsafeUnpin for ToolNode
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