rig-derive 0.42.0

Internal crate that implements Rig derive macros.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![allow(unused_imports)]

use rig_agent::tool::ToolContext;
use rig_derive::rig_tool;

#[rig_tool(params(context = "host context"))]
fn context_in_params(
    #[rig(context)]
    context: &mut ToolContext,
    query: String,
) -> Result<String, rig_core::tool::ToolExecutionError> {
    let _ = context;
    Ok(query)
}

fn main() {}