pub struct AskUserTool { /* private fields */ }Expand description
The structured user-question tool. name is the registered spelling —
ASK_USER under cc-parity, additionally REQUEST_USER_INPUT
under cx-parity.
Implementations§
Source§impl AskUserTool
impl AskUserTool
Sourcepub fn new(name: &'static str) -> Self
pub fn new(name: &'static str) -> Self
A tool registered under name (one of ASK_USER /
REQUEST_USER_INPUT).
Trait Implementations§
Source§impl Clone for AskUserTool
impl Clone for AskUserTool
Source§fn clone(&self) -> AskUserTool
fn clone(&self) -> AskUserTool
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AskUserTool
impl Debug for AskUserTool
Source§impl Default for AskUserTool
impl Default for AskUserTool
Source§impl Tool for AskUserTool
impl Tool for AskUserTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
The built-in description. May be overridden via
crate::Config.Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema describing the tool’s input object.
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run the tool. Returns text to feed back to the model.
Source§fn structured_output(&self) -> bool
fn structured_output(&self) -> bool
Whether a successful textual result is also a complete JSON value
that protocol adapters should expose as structured output. Text
remains the model-facing representation, preserving compatibility.
Auto Trait Implementations§
impl Freeze for AskUserTool
impl RefUnwindSafe for AskUserTool
impl Send for AskUserTool
impl Sync for AskUserTool
impl Unpin for AskUserTool
impl UnsafeUnpin for AskUserTool
impl UnwindSafe for AskUserTool
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