pub struct ToolSearch { /* private fields */ }Expand description
The tool_search tool over a session’s tools.
Implementations§
Source§impl ToolSearch
impl ToolSearch
Sourcepub fn new(tools: Tools) -> ToolSearch
pub fn new(tools: Tools) -> ToolSearch
The tool, searching tools.
Trait Implementations§
Source§impl Tool for ToolSearch
impl Tool for ToolSearch
Source§fn declaration(&self) -> &ToolDeclaration
fn declaration(&self) -> &ToolDeclaration
Name, description and argument schema as sent to the model.
Source§fn execute(
&self,
_call_id: String,
args: Value,
_cancel: CancellationToken,
_updates: UpdateSink,
) -> BoxFuture<'_, Result<ToolResult, String>>
fn execute( &self, _call_id: String, args: Value, _cancel: CancellationToken, _updates: UpdateSink, ) -> BoxFuture<'_, Result<ToolResult, String>>
Runs the tool with validated arguments.
Source§fn execution_mode(&self) -> ExecutionMode
fn execution_mode(&self) -> ExecutionMode
See
ExecutionMode.Source§fn output_schema(&self) -> Option<&Value>
fn output_schema(&self) -> Option<&Value>
JSON Schema of the value the tool returns as
structuredContent, for
tools whose results scripts consume (pi’s outputSchema).Auto Trait Implementations§
impl Forget for ToolSearch
impl Freeze for ToolSearch
impl RefUnwindSafe for ToolSearch
impl Send for ToolSearch
impl Sync for ToolSearch
impl Unpin for ToolSearch
impl UnsafeUnpin for ToolSearch
impl UnwindSafe for ToolSearch
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