Expand description
§ollama-client
A Rust client library for the Ollama API.
Covers all Ollama API endpoints: chat, generate, embeddings, model management (list, show, copy, delete, pull, push, create), running models, blobs, and version.
§Async usage
use ollama_client::{OllamaClient, types::Message};
let client = OllamaClient::new();
let response = client.chat()
.model("gemma4")
.messages(vec![Message::user("Hello!")])
.send()
.await?;
println!("{}", response.message.content);§Blocking usage (feature blocking, enabled by default)
use ollama_client::blocking::BlockingClient;
use ollama_client::types::Message;
let client = BlockingClient::new();
let response = client.chat()
.model("gemma4")
.messages(vec![Message::user("Hello!")])
.send()?;
println!("{}", response.message.content);Re-exports§
pub use client::OllamaClient;pub use client::OllamaClientBuilder;pub use error::OllamaError;pub use error::Result;