pub struct AskUserTool;Expand description
Tool for prompting the user for input or assistance
This tool allows the LLM to ask the user questions or request help when it doesn’t have enough information to proceed. The user’s response is returned as the tool’s result.
§Examples
use mojentic::llm::tools::ask_user_tool::AskUserTool;
use mojentic::llm::tools::LlmTool;
use std::collections::HashMap;
use serde_json::json;
let tool = AskUserTool::new();
let mut args = HashMap::new();
args.insert("user_request".to_string(), json!("What is your favorite color?"));
// This would prompt the user for input
// let result = tool.run(&args).unwrap();Implementations§
Source§impl AskUserTool
impl AskUserTool
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for AskUserTool
impl Default for AskUserTool
Auto Trait Implementations§
impl Freeze for AskUserTool
impl RefUnwindSafe for AskUserTool
impl Send for AskUserTool
impl Sync for AskUserTool
impl Unpin 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