.NET SDK for local/remote Ollama API interaction
Top 36.3% on sourcepulse
OllamaSharp provides .NET bindings for the Ollama API, enabling seamless integration with local or remote Ollama instances for .NET developers. It offers a user-friendly interface to all Ollama API endpoints, including chat, embeddings, model management, and multi-modal capabilities, with real-time streaming and progress reporting.
How It Works
The library wraps each Ollama API endpoint in awaitable methods, supporting response streaming for interactive applications. It includes a Chat
class for managing conversational history and tool calls, and integrates with Microsoft's Microsoft.Extensions.AI
library, implementing IChatClient
and IEmbeddingGenerator
for cross-provider AI development.
Quick Start & Requirements
Install-Package OllamaSharp
Highlighted Details
Maintenance & Community
mili-tan
for API synchronization.Licensing & Compatibility
Limitations & Caveats
The README does not specify the license, which may impact commercial use or closed-source linking. While OllamaApiClient
implements IChatClient
and IEmbeddingGenerator
, these abstractions do not expose the full Ollama API specification.
1 week ago
1 day