pub struct SimpleDateTool;Expand description
Simple date resolution tool that resolves relative date expressions to absolute dates
This tool takes text like “three days from now” or “next Tuesday” and resolves it to an absolute date. It uses a simple heuristic approach for common patterns.
§Examples
ⓘ
use mojentic::llm::tools::simple_date_tool::SimpleDateTool;
let tool = SimpleDateTool;
let args = HashMap::from([
("relative_date".to_string(), json!("tomorrow"))
]);
let result = tool.run(&args)?;
// result contains absolute date for tomorrowTrait Implementations§
Source§impl Clone for SimpleDateTool
impl Clone for SimpleDateTool
Source§fn clone(&self) -> SimpleDateTool
fn clone(&self) -> SimpleDateTool
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 moreAuto Trait Implementations§
impl Freeze for SimpleDateTool
impl RefUnwindSafe for SimpleDateTool
impl Send for SimpleDateTool
impl Sync for SimpleDateTool
impl Unpin for SimpleDateTool
impl UnwindSafe for SimpleDateTool
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