Themis.Inference.Ollama 1.5.1

dotnet add package Themis.Inference.Ollama --version 1.5.1
                    
NuGet\Install-Package Themis.Inference.Ollama -Version 1.5.1
                    
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="Themis.Inference.Ollama" Version="1.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Themis.Inference.Ollama" Version="1.5.1" />
                    
Directory.Packages.props
<PackageReference Include="Themis.Inference.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 Themis.Inference.Ollama --version 1.5.1
                    
#r "nuget: Themis.Inference.Ollama, 1.5.1"
                    
#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 Themis.Inference.Ollama@1.5.1
                    
#: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=Themis.Inference.Ollama&version=1.5.1
                    
Install as a Cake Addin
#tool nuget:?package=Themis.Inference.Ollama&version=1.5.1
                    
Install as a Cake Tool

Themis.Inference.Ollama

Use Themis.Inference.Ollama when an application needs conversational inference or typed System One decisions through an Ollama server, without the ONNX Runtime and tokenizer dependencies used by Themis.Inference.

The package provides two separate integrations: the conversational IInferenceProvider and the typed IDecisionInferenceProvider. Register only the path the application needs.

Conversational inference

AddThemisOllamaChat registers the chat provider and IOllamaModelCatalog:

using Themis.Inference.Ollama.Extensions;

services.AddThemisOllamaChat(options =>
{
    options.Endpoint = new Uri("http://localhost:11434/");
    options.DefaultModel = "qwen2.5:latest";
});

The selected chat model must be available from the configured Ollama server. It can also be supplied on each InferenceRequest.

System One decision inference

Use AddThemisOllamaSystemOneDecisionInference to register Ollama's typed decision endpoint. Register it through AddThemis's service callback so it replaces the default ONNX decision provider while leaving chat registration independent:

services.AddThemis(
    options =>
    {
        options.DefaultModel = "nimble";
        options.RouteUnspecifiedRequestsToDefaultModel = true;
    },
    configureServices: registrations =>
        registrations.AddThemisOllamaSystemOneDecisionInference(options =>
            options.Endpoint = new Uri("http://localhost:11434/")));

An explicit DecisionRequest.Model takes precedence over ThemisOptions.DefaultModel. The endpoint requires Ollama 0.35.0 or later and a local model trained for System One. System One supports choice, score, and noul answers; choice criteria must contain 2-255 options (the model may impose a lower limit), and score criteria must contain 2-10 ordered levels. It does not support tools, streaming, or generation controls. A generic GGUF or chat model is not automatically a System One model; it must be supported by Ollama and trained/packaged for that decision API.

The adapter sends the original Themis state and namespaced extras in a versioned System One state envelope. The extras.rldc namespace includes the central question and attribute-driven prior results; application-defined namespaces are preserved. Task and Language remain routing hints and are not sent to the model. The System One model must be prepared to consume this envelope.

The adapter maps result probabilities to Themis answer-confidence semantics rather than reusing System One's distribution concentration value. System One input/output token usage is retained in DecisionUsage.

Themis.Inference continues to expose the existing AddThemisOllama registration for chat compatibility. Applications that need only the chat integration can reference this package directly and use AddThemisOllamaChat.

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 (1)

Showing the top 1 NuGet packages that depend on Themis.Inference.Ollama:

Package Downloads
Themis.Inference

Prepared ONNX and RLCD GGUF inference, bundle validation, and model packing for Themis.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.1 93 10/19/2026
1.3.0 136 10/17/2026
1.2.0 101 10/17/2026
1.0.0 118 10/15/2026