cliai 0.2.0

A small Rust library for invoking AI tools through CLI backends like Ollama and GitHub Copilot CLI.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use cliai::{AiBackend, Copilot, GenerateRequest};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let ai = Copilot::new();

    let response = ai.generate(&GenerateRequest::new(
        "Explain the purpose of unit tests in Rust.",
    ))?;

    println!("{}", response.text);
    Ok(())
}