pub struct MergedToolset { /* private fields */ }Expand description
A toolset that merges tools from multiple inner toolsets into one.
Toolsets are resolved in registration order. If two inner toolsets
provide a tool with the same name, the first one wins (last-registered
duplicates are dropped with a tracing::warn).
§Example
ⓘ
use adk_tool::toolset::MergedToolset;
let merged = MergedToolset::new("all_tools", vec![
Arc::new(browser_toolset),
Arc::new(search_toolset),
]);Implementations§
Trait Implementations§
Source§impl Toolset for MergedToolset
impl Toolset for MergedToolset
Source§fn tools<'life0, 'async_trait>(
&'life0 self,
ctx: Arc<dyn ReadonlyContext>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Arc<dyn Tool>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tools<'life0, 'async_trait>(
&'life0 self,
ctx: Arc<dyn ReadonlyContext>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Arc<dyn Tool>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the tools available in this toolset for the given context.
Source§fn process_llm_request<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: Arc<dyn ReadonlyContext>,
_request: &'life1 mut LlmRequest,
) -> Pin<Box<dyn Future<Output = Result<(), AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn process_llm_request<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: Arc<dyn ReadonlyContext>,
_request: &'life1 mut LlmRequest,
) -> Pin<Box<dyn Future<Output = Result<(), AdkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Applies toolset-specific context to an LLM request before each model call. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for MergedToolset
impl !UnwindSafe for MergedToolset
impl Freeze for MergedToolset
impl Send for MergedToolset
impl Sync for MergedToolset
impl Unpin for MergedToolset
impl UnsafeUnpin for MergedToolset
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