OllamaSharp  by awaescher

.NET SDK for local/remote Ollama API interaction

created 1 year ago
1,060 stars

Top 36.3% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

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 via NuGet: Install-Package OllamaSharp
  • Requires .NET.
  • Demo application included in the repository.
  • Official documentation and usage examples are available.

Highlighted Details

  • Full coverage of Ollama API endpoints.
  • Real-time response streaming and progress reporting.
  • Integration with Microsoft.Extensions.AI for unified AI development.
  • Support for multi-modal vision models.

Maintenance & Community

  • Actively maintained, with significant contributions noted from mili-tan for API synchronization.
  • Credits the Ollama project for icon and name.

Licensing & Compatibility

  • No explicit license mentioned in the README.
  • Compatible with .NET applications, including those using Microsoft.Extensions.AI.

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.

Health Check
Last commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
13
Issues (30d)
20
Star History
117 stars in the last 90 days

Explore Similar Projects

Starred by John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), Shawn Wang Shawn Wang(Editor of Latent Space), and
3 more.

ollama-js by ollama

0.4%
4k
JS SDK for Ollama
created 1 year ago
updated 3 weeks ago
Feedback? Help us improve.