pub struct RuntimeAwareToolAdapter { /* private fields */ }Expand description
Adapter that wraps a RuntimeAwareTool into a standard Tool.
When used outside a graph context, the tool receives a default
(empty) ToolRuntime.
Implementations§
Source§impl RuntimeAwareToolAdapter
impl RuntimeAwareToolAdapter
pub fn new(tool: Arc<dyn RuntimeAwareTool>) -> Self
pub async fn set_runtime(&self, runtime: ToolRuntime)
Trait Implementations§
Source§impl Tool for RuntimeAwareToolAdapter
impl Tool for RuntimeAwareToolAdapter
fn name(&self) -> &'static str
fn description(&self) -> &'static str
fn parameters(&self) -> Option<Value>
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 as_tool_definition(&self) -> ToolDefinition
Auto Trait Implementations§
impl Freeze for RuntimeAwareToolAdapter
impl !RefUnwindSafe for RuntimeAwareToolAdapter
impl Send for RuntimeAwareToolAdapter
impl Sync for RuntimeAwareToolAdapter
impl Unpin for RuntimeAwareToolAdapter
impl UnsafeUnpin for RuntimeAwareToolAdapter
impl !UnwindSafe for RuntimeAwareToolAdapter
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