easy_llm 0.2.0

Provide an asynchronous LLM caller that can integrate with various LLM services, including Ollama.
Documentation
use easy_llm::{Error, Llm, LlmControl, Provider};

fn get_test_gemini_api() -> String {
    std::fs::read_to_string(std::env::current_dir().unwrap().join("_test_api_key")).unwrap()
}

#[tokio::main]
async fn main() -> Result<(), Error> {
    let gemini_client = Llm::new(
        Provider::Gemini,             // or use `Provider::parse_str()`
        "gemini-2.5-pro".to_string(), // Replace with your downloaded Ollama model
        Some(get_test_gemini_api()),  // No API key needed for Ollama
        None,                         // Optional: temperature
        None,                         // Optional: max_tokens
        None, // Optional: base_url for Ollama (defaults to http://localhost:11434, 11434)
              // Type: `Option<(String, u16)>`
    );

    println!("Calling Gemini...");
    match gemini_client
        .call("Tell me a short story about a brave knight.")
        .await
    {
        Ok(response) => println!("Gemini Response: {response}"),
        Err(e) => eprintln!("Error calling Ollama: {e:?}"),
    }
    Ok(())
}