pub struct PrefixedToolset { /* private fields */ }Expand description
A toolset wrapper that prefixes all tool names from an inner toolset.
Useful for namespacing tools when composing multiple toolsets that might have overlapping tool names.
§Example
ⓘ
use adk_tool::toolset::PrefixedToolset;
let browser = BrowserToolset::new(session);
let prefixed = PrefixedToolset::new(Arc::new(browser), "browser");
// Tools become "browser_navigate", "browser_click", etc.Implementations§
Trait Implementations§
Source§impl Toolset for PrefixedToolset
impl Toolset for PrefixedToolset
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 PrefixedToolset
impl !UnwindSafe for PrefixedToolset
impl Freeze for PrefixedToolset
impl Send for PrefixedToolset
impl Sync for PrefixedToolset
impl Unpin for PrefixedToolset
impl UnsafeUnpin for PrefixedToolset
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