Themis.Inference.Ollama
4.0.2
dotnet add package Themis.Inference.Ollama --version 4.0.2
NuGet\Install-Package Themis.Inference.Ollama -Version 4.0.2
<PackageReference Include="Themis.Inference.Ollama" Version="4.0.2" />
<PackageVersion Include="Themis.Inference.Ollama" Version="4.0.2" />
<PackageReference Include="Themis.Inference.Ollama" />
paket add Themis.Inference.Ollama --version 4.0.2
#r "nuget: Themis.Inference.Ollama, 4.0.2"
#:package Themis.Inference.Ollama@4.0.2
#addin nuget:?package=Themis.Inference.Ollama&version=4.0.2
#tool nuget:?package=Themis.Inference.Ollama&version=4.0.2
Themis.Inference.Ollama
Use Themis.Inference.Ollama when an application needs typed System One
decisions through an Ollama server, without the ONNX Runtime and tokenizer
dependencies used by Themis.Inference.
System One decision inference
Use AddThemisOllamaSystemOneDecisionInference to register Ollama's typed
decision endpoint. Register the shared decision router from Themis.Core and
the provider directly; this path does not register ONNX runtime or model
artifact services:
using Themis.Core;
using Themis.Core.Extensions;
using Themis.Inference.Ollama.Extensions;
services.AddThemisDecisionRouter(new DecisionRouterOptions("nimble")
{
RouteUnspecifiedRequestsToDefaultModel = true
});
services.AddThemisOllamaSystemOneDecisionInference(
options => options.Endpoint = new Uri("http://localhost:11434/"));
AddThemis remains available as the default ONNX convenience registration.
For an existing application already using it, the provider can still be
registered in its configureServices callback.
An explicit DecisionRequest.Model takes precedence over
the configured router default (DecisionRouterOptions.DefaultModel in the
standalone composition or ThemisOptions.DefaultModel through AddThemis).
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.
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.Http (>= 10.0.13)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Options (>= 10.0.13)
- OllamaSharp (>= 5.5.0)
- Themis.Core (>= 4.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Themis.Inference.Ollama:
| Package | Downloads |
|---|---|
|
Themis.Inference
Prepared ONNX inference, bundle validation, and model packing for Themis. |
GitHub repositories
This package is not used by any popular GitHub repositories.