pub struct BasicToolset { /* private fields */ }Expand description
A simple toolset that wraps a static list of tools with optional filtering.
Implementations§
Source§impl BasicToolset
impl BasicToolset
Sourcepub fn new(name: impl Into<String>, tools: Vec<Arc<dyn Tool>>) -> Self
pub fn new(name: impl Into<String>, tools: Vec<Arc<dyn Tool>>) -> Self
Create a new BasicToolset with the given name and tools.
Sourcepub fn with_predicate(self, predicate: ToolPredicate) -> Self
pub fn with_predicate(self, predicate: ToolPredicate) -> Self
Set a predicate to filter which tools are returned.
Trait Implementations§
Source§impl Toolset for BasicToolset
impl Toolset for BasicToolset
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 BasicToolset
impl !UnwindSafe for BasicToolset
impl Freeze for BasicToolset
impl Send for BasicToolset
impl Sync for BasicToolset
impl Unpin for BasicToolset
impl UnsafeUnpin for BasicToolset
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