topkio 0.1.2

Not all AI agent frameworks are called topkio.
Documentation

topkio

Not all AI agent frameworks are called topkio.

Small, fast, powerful, and easy to use.

Quick Start

use topkio::OpenAIClient;

#[tokio::main]
async fn main() {
    let client = OpenAIClient::with_ollama("http://localhost:11434/v1");

    let config_builder = client.config("llama3.2");
    let builder = config_builder.stream(true);
    let builder = builder.temperature(0.8);
    let config = builder.build();

    let prompt = "1 + 1 = ";

    let _ = client
        .prompt(config, prompt, &mut |res| {
            print!("{}", res);
            Ok(())
        })
        .await;

    println!("\n");
}