pepperoni21/ollama-rs
A simple and easy-to-use library for interacting with the Ollama API.
What it solves
Ollama-rs provides a simple and easy-to-use Rust library for interacting with the Ollama API, allowing developers to integrate local large language models into their Rust applications without building API requests from scratch.
How it works
It connects to a local Ollama instance (or a compatible runner like llmman) through a clean Rust client. Developers can use it to generate completions, stream responses, manage chat history, create and copy models, generate embeddings, perform system one decisions, make function calls using built-in or custom tools, and handle thinking processes.
Who it’s for
This project is for Rust developers who want to build applications powered by local AI models running through Ollama.
Highlights
- Simple initialization with default or custom host and port settings
- Support for both standard and streaming completion generation
- Chat mode with built-in history management
- Model management capabilities including listing, showing info, creating, copying, and deleting models
- Embedding generation for single inputs or batches
- Function calling support with built-in tools and a custom tool creation macro
Related
- Project
- Project
- Project
- Project
- Project