Soenneker.SemanticKernel.Pool.Ollama 4.0.559

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.SemanticKernel.Pool.Ollama --version 4.0.559
                    
NuGet\Install-Package Soenneker.SemanticKernel.Pool.Ollama -Version 4.0.559
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.SemanticKernel.Pool.Ollama" Version="4.0.559" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.SemanticKernel.Pool.Ollama" Version="4.0.559" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.SemanticKernel.Pool.Ollama" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.SemanticKernel.Pool.Ollama --version 4.0.559
                    
#r "nuget: Soenneker.SemanticKernel.Pool.Ollama, 4.0.559"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.SemanticKernel.Pool.Ollama@4.0.559
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.SemanticKernel.Pool.Ollama&version=4.0.559
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.SemanticKernel.Pool.Ollama&version=4.0.559
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.SemanticKernel.Pool.Ollama

Ollama connector registration helpers for Soenneker.SemanticKernel.Pool.

Installation

dotnet add package Soenneker.SemanticKernel.Pool.Ollama

Add an Ollama entry

Resolve the pool and HTTP client cache from dependency injection, then register the model exposed by your Ollama server:

using Soenneker.SemanticKernel.Enums.KernelType;
using Soenneker.SemanticKernel.Pool.Ollama;

await pool.AddOllama(
    poolId: "chat",
    key: "local-llama",
    type: KernelType.Chat,
    modelId: "llama3.2",
    endpoint: "http://localhost:11434",
    httpClientCache: httpClientCache,
    rps: null,
    rpm: null,
    rpd: null,
    cancellationToken: cancellationToken);

Supported types are:

  • KernelType.Chat for Ollama chat completion
  • KernelType.Completion for text generation
  • KernelType.Embedding for embedding generation

Other types throw NotSupportedException when the pool first constructs the kernel.

The adapter creates an HTTP client with the supplied endpoint as its base address, a five-minute timeout, and the cache key ollama:{poolId}:{key}. The optional apiKey is stored in SemanticKernelOptions but is not added to HTTP requests by this adapter. Configure authentication separately if the endpoint requires it.

Pool quota values are reservations made when GetAvailable selects the entry. tokensPerDay counts one unit per acquisition; it is not populated from model token usage.

Remove the entry

Use the matching helper so both the pool entry and cached HTTP client are removed:

await pool.RemoveOllama(
    "chat",
    "local-llama",
    httpClientCache,
    cancellationToken);
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.574 41 9/13/2026
4.0.573 48 9/13/2026
4.0.572 41 9/13/2026
4.0.571 40 9/13/2026
4.0.570 38 9/13/2026
4.0.569 42 9/13/2026
4.0.568 46 9/12/2026
4.0.567 38 9/12/2026
4.0.565 40 9/12/2026
4.0.564 56 9/9/2026
4.0.563 74 9/9/2026
4.0.562 66 9/9/2026
4.0.561 91 9/8/2026
4.0.560 89 9/8/2026
4.0.559 93 9/7/2026
4.0.558 93 9/7/2026
4.0.557 102 9/7/2026
4.0.556 88 9/7/2026
4.0.555 94 9/5/2026
4.0.554 90 9/5/2026
Loading failed

Updated Soenneker.Utils.HttpClientCache to 4.0.2063