pepperoni21/ollama-rs
A simple and easy-to-use library for interacting with the Ollama API.
What it solves
It provides a simple, easy-to-use Rust library for interacting with the Ollama API, allowing developers to integrate local LLMs into Rust applications without writing raw HTTP requests.
How it works
The library acts as a wrapper around the Ollama API, providing typed requests and responses for various operations. It supports asynchronous communication via tokio and includes a Coordinator for managing tool-use (function calling) and chat history.
Who it’s for
Rust developers who want to run and manage local large language models using Ollama or compatible runners like llmman.
Highlights
- Comprehensive API Coverage: Supports completion generation, chat mode, embedding generation, and model management (create, copy, delete).
- Streaming Support: Offers streaming responses for both text generation and model creation.
- Function Calling: Includes a
Coordinatorand afunctionmacro to easily create and attach custom tools for LLMs to use. - System One Integration: Supports decision-making models (like
nimble) for choice, yes/no, and scoring questions. - Thinking Mode: Supports models that provide internal reasoning/thinking processes.
Related
- Project
- Project
- Dispatch
- Project
- Dispatch