llm-tool 0.4.2

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
17
// Verifies that ToolContext parameters are accepted and passed through.
use llm_tool::llm_tool;

/// Echoes the greeting using the context.
#[llm_tool]
fn context_echo(
    /// The greeting text.
    greeting: String,
    ctx: &llm_tool::ToolContext,
) -> Result<String, String> {
    let _ctx = ctx;
    Ok(greeting)
}

fn main() {
    let _t = ContextEcho;
}