Ollama-rs
Ollama-rs is a Rust client library for the Ollama API, covering text completion including streaming, chat, embeddings, function calling and model management, built by following Ollama's own API documentation.
Ollama-rs is a Rust library for interacting with the Ollama API, built by following Ollama's own API documentation. It covers completion generation with and without streaming, chat mode, listing and inspecting local models, creating, copying and deleting models, generating single or batched embeddings, and making function calls with custom tools.
It connects to localhost port 11434 by default but can be pointed at a custom host and port, which lets it work unchanged against llmman, a local model runner that serves the Ollama API on a different port. It is added to a project through Cargo, with an option to track the unstable master branch directly from the project's Git repository.