use llmclient::functions::*;
use llmclient::common::*;
#[tokio::main]
async fn main() {
let func_def =
r#"
// Derive the value of the arithmetic expression
// expr: An arithmetic expression
fn arithmetic(expr)
"#;
let _func_def2 =
r#"
// this is another func
// arg10: The first arg
// arg11: The Second arg
fn func(arg10, arg11)
"#;
let func_call = json_function("gemini", &[func_def]);
let func_call = match func_call {
Ok(ref fc) => fc.to_string(),
Err(e) => e.to_string()
};
let result = call_llm_model_function("gemini", "gemini-pro", "", &["The answer is (60 * 24) * 365.25".to_string()], 0.2, false, true, &[&func_call]).await;
println!("result: {result:?}");
}