use llm_tool::{llm_prompt, llm_resource, llm_tool};
#[llm_tool]
fn modify_string(
mut input: String,
mut count: u32,
) -> Result<String, String> {
input.push_str("!");
count += 1;
Ok(format!("{input} {count}"))
}
#[llm_prompt]
fn modify_prompt(
mut name: String,
) -> Result<String, String> {
name.push_str("!");
Ok(format!("Hello {name}"))
}
#[llm_resource(uri = "test://{val}")]
fn modify_resource(
mut val: String,
) -> Result<String, String> {
val.push_str("!");
Ok(val)
}
fn main() {
assert_eq!(std::mem::size_of::<ModifyString>(), 0);
assert_eq!(std::mem::size_of::<ModifyPrompt>(), 0);
assert_eq!(std::mem::size_of::<ModifyResource>(), 0);
}