# awaescher/OllamaSharp

The easiest way to use Ollama in .NET

Repository: https://github.com/awaescher/OllamaSharp
Canonical: https://ross.abutalabs.com/products/ollamasharp
Homepage: https://www.nuget.org/packages/OllamaSharp
Language: C#
License: MIT
License Family: permissive
Topics: llm, ollama, ollama-api, llama, ai, gpt, llamacpp, localllama, streaming, microsoft-extensions-ai, ichatclient, library
Last push: 2026-07-24T10:06:58+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 94, release rhythm 82, longevity 75
- inputs: {"age_days": 1053, "days_push": 40, "days_rel": 40, "gap_med": 2, "n_releases_24m": 114}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1400, forks 187 (observed 2026-08-28T04:04:37.147412+00:00)

## What it is
OllamaSharp is a .NET client library providing bindings for the entire Ollama API, including chat, generation, embeddings, and model management. It supports streaming responses, tool/function calling with source generators, vision models, and integrates with Microsoft.Extensions.AI and Semantic Kernel.

## Use cases
- call ollama from c#
- stream llm chat responses in .net
- generate embeddings with ollama in dotnet
- pull and manage ollama models programmatically
- add function calling to a .net chatbot
- use local llms in an asp.net app
- build a rag pipeline with ollama embeddings

## When to choose
- you are building a .NET application that talks to a local or remote Ollama server
- you want full Ollama API coverage with streaming and progress reporting
- you need Microsoft.Extensions.AI/IChatClient compatibility or Semantic Kernel integration
- you want tool calling with source-generator support in C#

## When to avoid
- you use Python, Node.js, or another non-.NET language
- you need a client for OpenAI or other LLM providers rather than Ollama
- you want a ready-made chat UI rather than an API client library

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, http-client, sdk, chatbot, rag
- domain: large-language-models, artificial-intelligence, developer-tools, apis
- platform: dotnet, cross-platform
- tags: ollama, csharp, nuget, streaming, function-calling, embeddings, ichatclient, local-llm

## Member repositories
- awaescher/OllamaSharp (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:37.147412+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:39:05.651387+00:00, confidence not recorded.
  - readme: https://github.com/awaescher/OllamaSharp (fetched 2026-08-28T04:04:37.147412+00:00, sha 651bd1288e08)
  - homepage: https://www.nuget.org/packages/OllamaSharp (fetched 2026-08-29T11:53:13.894789+00:00, sha aa14065a0c62)
  - site_page: https://www.nuget.org/policies/About (fetched 2026-08-29T11:53:13.904386+00:00, sha a113b8a074c9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
