Rldc.Inference.Ollama 0.5.0

Suggested Alternatives

Themis.Inference.Ollama

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Rldc.Inference.Ollama --version 0.5.0
                    
NuGet\Install-Package Rldc.Inference.Ollama -Version 0.5.0
                    
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="Rldc.Inference.Ollama" Version="0.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rldc.Inference.Ollama" Version="0.5.0" />
                    
Directory.Packages.props
<PackageReference Include="Rldc.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 Rldc.Inference.Ollama --version 0.5.0
                    
#r "nuget: Rldc.Inference.Ollama, 0.5.0"
                    
#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 Rldc.Inference.Ollama@0.5.0
                    
#: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=Rldc.Inference.Ollama&version=0.5.0
                    
Install as a Cake Addin
#tool nuget:?package=Rldc.Inference.Ollama&version=0.5.0
                    
Install as a Cake Tool

Rldc.Inference.Ollama

Use Rldc.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 Rldc.Inference.

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

Conversational inference

AddRldcOllamaChat registers the chat provider and IOllamaModelCatalog:

using Rldc.Inference.Ollama.Extensions;

services.AddRldcOllamaChat(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 AddRldcOllamaSystemOneDecisionInference to register Ollama's typed decision endpoint. Register it through AddRldc's service callback so it replaces the default ONNX decision provider while leaving chat registration independent:

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

An explicit DecisionRequest.Model takes precedence over RldcOptions.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 Rldc 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 Rldc answer-confidence semantics rather than reusing System One's distribution concentration value. System One input/output token usage is retained in DecisionUsage.

Rldc.Inference continues to expose the existing AddRldcOllama registration for chat compatibility. Applications that need only the chat integration can reference this package directly and use AddRldcOllamaChat.

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