mini_ollama_client 0.1.0

Simple ollama client with minimal dependency in rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use mini_ollama_client::send_request;
use std::error::Error;

fn main() -> Result<(), Box<dyn Error>> {
    println!("Starting the Ollama client...");

    let server = "localhost:11434";
    let prompt = "Hello ollama.";
    let model = Some("qwen2.5-coder");

    match send_request(server, prompt, model) {
        Ok(response) => println!("Response: {}", response),
        Err(e) => eprintln!("Error: {}", e),
    }

    Ok(())
}