llm-tool 0.1.3

Framework-agnostic Rust tool definitions for LLM agents
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use llm_tool::llm_tool;

/// Fetches data asynchronously.
#[llm_tool]
async fn fetch_data(
    /// The URL to fetch.
    url: String,
) -> Result<String, String> {
    Ok(format!("fetched: {url}"))
}

fn main() {
    assert!(std::mem::size_of::<FetchData>() == 0);
}