llm-tool 0.1.4

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

/// Adds two numbers together.
#[llm_tool]
fn add_numbers(
    /// The first number.
    a: i64,
    /// The second number.
    b: i64,
) -> Result<String, String> {
    Ok(format!("{}", a + b))
}

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