pub struct ToolRegistry { /* private fields */ }Expand description
Registry of available tools, keyed by name.
Implementations§
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn default_tools() -> Self
pub fn default_tools() -> Self
Create a registry with all default built-in tools.
Sourcepub fn schemas(&self) -> Vec<ToolSchema>
pub fn schemas(&self) -> Vec<ToolSchema>
Get tool schemas for the API request.
Sourcepub fn core_schemas(&self) -> Vec<ToolSchema>
pub fn core_schemas(&self) -> Vec<ToolSchema>
Get only always-loaded (core) tool schemas. Deferred tools are discoverable via ToolSearch but not sent on every request.
Sourcepub fn deferred_names(&self) -> Vec<&str>
pub fn deferred_names(&self) -> Vec<&str>
Get deferred tool names (for the ToolSearch system prompt).
Auto Trait Implementations§
impl Freeze for ToolRegistry
impl !RefUnwindSafe for ToolRegistry
impl Send for ToolRegistry
impl Sync for ToolRegistry
impl Unpin for ToolRegistry
impl UnsafeUnpin for ToolRegistry
impl !UnwindSafe for ToolRegistry
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