#120 · Primary category: LLM Application Frameworks

OllamaSharp

ai gpt ichatclient library llama llamacpp llm localllama microsoft-extensions-ai ollama ollama-api streaming

The easiest way to use Ollama in .NET

Project last updated:07/24/26

GitHub Stars

1.4K

Forks

187

Contributors

50

License

MIT

Why we included this project

OllamaSharp is a .NET client for the Ollama API, so C# developers can call local or remote Ollama models without hand-rolling HTTP requests. It covers the whole API surface, including chat, embeddings, model management, and image input for vision models, and streams responses straight to the app. The Chat class carries message history and tool-call results across turns, and a source-generator-powered tools engine handles function calling with less manual JSON. Since it implements Microsoft.Extensions.AI's IChatClient and IEmbeddingGenerator, teams can switch between hosted providers and a local Ollama server behind one code path. Setup takes a few lines, and the docs cover everything from model pulls to advanced configuration, so a solo developer can get productive fast.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category