pub struct ContextAwareToolAdapter { /* private fields */ }Expand description
Wrapper that adapts a ContextAwareTool into a standard Tool.
When used outside a graph context, the tool receives a default
(empty) ToolContext.
Implementations§
Source§impl ContextAwareToolAdapter
impl ContextAwareToolAdapter
pub fn new(inner: Arc<dyn ContextAwareTool>) -> Self
Trait Implementations§
Source§impl Tool for ContextAwareToolAdapter
impl Tool for ContextAwareToolAdapter
fn name(&self) -> &'static str
fn description(&self) -> &'static str
fn call<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn parameters(&self) -> Option<Value>
fn as_tool_definition(&self) -> ToolDefinition
Auto Trait Implementations§
impl Freeze for ContextAwareToolAdapter
impl !RefUnwindSafe for ContextAwareToolAdapter
impl Send for ContextAwareToolAdapter
impl Sync for ContextAwareToolAdapter
impl Unpin for ContextAwareToolAdapter
impl UnsafeUnpin for ContextAwareToolAdapter
impl !UnwindSafe for ContextAwareToolAdapter
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