OllamaSharp 1.0.1
OllamaSharp 🦙
OllamaSharp is a .NET binding for the Ollama API, making it easy to interact with Ollama using your favorite .NET languages.
Features
- Intuitive API client: Set up and interact with Ollama in just a few lines of code.
- Support for various Ollama operations: Including streaming completions (chatting), listing local models, pulling new models, show model information, creating new models, copying models, deleting models, pushing models, and generating embeddings.
- Real-time streaming: Stream responses directly to your application.
- Progress reporting: Get real-time progress feedback on tasks like model pulling.
Usage
Here's a simple example to get you started:
// set up the client
var uri = new Uri("http://localhost:11434");
var ollama = new OllamaApiClient(uri);
// list all local models
var models = await ollama.ListLocalModels();
// stream a completion and write to the console
// keep reusing the context to keep the chat topic going
var context = await ollama.StreamCompletion("How are you today?", "llama2", context, stream => Console.WriteLine(stream.Response));
// pull a model and report progress
await ollama.PullModel("mistral", status => Console.WriteLine($"({status.Percent}%) {status.Status}"));
Credits
Icon and name were reused from the amazing Ollama project.
Showing the top 20 packages that depend on OllamaSharp.
| Packages |
|---|
|
Microsoft.SemanticKernel.Connectors.Ollama
Semantic Kernel connector for Ollama. Contains services for text generation, chat completion and text embeddings.
|
.NET 5.0
- No dependencies.
| Version | Last updated |
|---|---|
| 5.4.12 | 12/8/2025 |
| 5.4.11 | 11/29/2025 |
| 5.4.10 | 12/2/2025 |
| 5.4.9 | 11/17/2025 |
| 5.4.8 | 11/8/2025 |
| 5.4.7 | 11/8/2025 |
| 5.4.6 | 11/8/2025 |
| 5.4.5 | 11/8/2025 |
| 5.4.4 | 11/8/2025 |
| 5.4.3 | 11/8/2025 |
| 5.4.2 | 11/8/2025 |
| 5.4.1 | 9/11/2025 |
| 5.3.12 | 9/11/2025 |
| 5.3.11 | 9/11/2025 |
| 5.3.10 | 9/11/2025 |
| 5.3.9 | 9/12/2025 |
| 5.3.8 | 9/12/2025 |
| 5.3.7 | 9/12/2025 |
| 5.3.6 | 8/26/2025 |
| 5.3.5 | 8/26/2025 |
| 5.3.4 | 8/26/2025 |
| 5.3.3 | 7/27/2025 |
| 5.3.2 | 7/27/2025 |
| 5.3.1 | 7/21/2025 |
| 5.2.10 | 7/17/2025 |
| 5.2.9 | 7/15/2025 |
| 5.2.8 | 7/15/2025 |
| 5.2.7 | 7/17/2025 |
| 5.2.6 | 7/16/2025 |
| 5.2.5 | 7/16/2025 |
| 5.2.4 | 7/17/2025 |
| 5.2.3 | 7/16/2025 |
| 5.2.2 | 6/9/2025 |
| 5.2.1 | 6/9/2025 |
| 5.1.20 | 6/8/2025 |
| 5.1.19 | 6/14/2025 |
| 5.1.18 | 6/14/2025 |
| 5.1.17 | 6/14/2025 |
| 5.1.16 | 6/8/2025 |
| 5.1.15 | 6/8/2025 |
| 5.1.14 | 6/8/2025 |
| 5.1.13 | 6/8/2025 |
| 5.1.12 | 5/30/2025 |
| 5.1.11 | 6/8/2025 |
| 5.1.10 | 6/8/2025 |
| 5.1.9 | 6/17/2025 |
| 5.1.8 | 6/8/2025 |
| 5.1.7 | 6/8/2025 |
| 5.1.6 | 6/8/2025 |
| 5.1.5 | 6/8/2025 |
| 5.1.4 | 6/8/2025 |
| 5.1.3 | 6/8/2025 |
| 5.1.2 | 6/15/2025 |
| 5.1.1 | 6/8/2025 |
| 5.1.0 | 6/8/2025 |
| 5.0.7 | 6/8/2025 |
| 5.0.6 | 6/8/2025 |
| 5.0.5 | 6/15/2025 |
| 5.0.4 | 6/8/2025 |
| 5.0.3 | 6/8/2025 |
| 5.0.2 | 6/15/2025 |
| 5.0.1 | 6/15/2025 |
| 4.0.22 | 6/8/2025 |
| 4.0.21 | 6/8/2025 |
| 4.0.20 | 6/14/2025 |
| 4.0.19 | 6/8/2025 |
| 4.0.18 | 6/8/2025 |
| 4.0.17 | 6/8/2025 |
| 4.0.16 | 6/8/2025 |
| 4.0.15 | 6/8/2025 |
| 4.0.14 | 6/8/2025 |
| 4.0.13 | 6/8/2025 |
| 4.0.12 | 6/8/2025 |
| 4.0.11 | 6/8/2025 |
| 4.0.10 | 6/8/2025 |
| 4.0.9 | 6/8/2025 |
| 4.0.8 | 6/8/2025 |
| 4.0.7 | 6/8/2025 |
| 4.0.6 | 6/8/2025 |
| 4.0.5 | 6/8/2025 |
| 4.0.4 | 6/8/2025 |
| 4.0.3 | 6/8/2025 |
| 4.0.2 | 6/8/2025 |
| 4.0.1 | 6/8/2025 |
| 4.0.0-preview.10 | 6/8/2025 |
| 4.0.0-preview.9 | 6/8/2025 |
| 4.0.0-preview.8 | 6/8/2025 |
| 3.0.15 | 6/8/2025 |
| 3.0.14 | 6/8/2025 |
| 3.0.13 | 6/8/2025 |
| 3.0.12 | 6/8/2025 |
| 3.0.11 | 6/8/2025 |
| 3.0.10 | 6/8/2025 |
| 3.0.9 | 6/8/2025 |
| 3.0.8 | 6/8/2025 |
| 3.0.7 | 6/8/2025 |
| 3.0.6 | 6/8/2025 |
| 3.0.5 | 6/8/2025 |
| 3.0.4 | 6/8/2025 |
| 3.0.3 | 6/8/2025 |
| 3.0.2 | 6/8/2025 |
| 3.0.1 | 6/8/2025 |
| 3.0.0 | 6/8/2025 |
| 2.1.3 | 6/8/2025 |
| 2.1.2 | 6/8/2025 |
| 2.1.1 | 6/8/2025 |
| 2.0.15 | 6/8/2025 |
| 2.0.14 | 6/8/2025 |
| 2.0.13 | 6/8/2025 |
| 2.0.12 | 6/8/2025 |
| 2.0.11 | 6/8/2025 |
| 2.0.10 | 6/8/2025 |
| 2.0.9 | 6/8/2025 |
| 2.0.8 | 6/8/2025 |
| 2.0.7 | 6/8/2025 |
| 2.0.6 | 6/8/2025 |
| 2.0.5 | 6/8/2025 |
| 2.0.4 | 6/8/2025 |
| 2.0.3 | 6/8/2025 |
| 2.0.2 | 6/15/2025 |
| 2.0.1 | 6/12/2025 |
| 1.1.13 | 6/8/2025 |
| 1.1.12 | 6/8/2025 |
| 1.1.11 | 6/8/2025 |
| 1.1.10 | 6/8/2025 |
| 1.1.9 | 6/8/2025 |
| 1.1.8 | 6/8/2025 |
| 1.1.7 | 6/8/2025 |
| 1.1.5 | 6/8/2025 |
| 1.1.4 | 6/8/2025 |
| 1.1.3 | 6/8/2025 |
| 1.1.2 | 6/9/2025 |
| 1.1.1 | 6/8/2025 |
| 1.1.0 | 6/8/2025 |
| 1.0.4 | 6/8/2025 |
| 1.0.3 | 6/8/2025 |
| 1.0.2 | 6/8/2025 |
| 1.0.1 | 6/8/2025 |
| 1.0.0 | 6/8/2025 |