Themis.Inference.Remote.SystemOne
4.7.1
See the version list below for details.
dotnet add package Themis.Inference.Remote.SystemOne --version 4.7.1
NuGet\Install-Package Themis.Inference.Remote.SystemOne -Version 4.7.1
<PackageReference Include="Themis.Inference.Remote.SystemOne" Version="4.7.1" />
<PackageVersion Include="Themis.Inference.Remote.SystemOne" Version="4.7.1" />
<PackageReference Include="Themis.Inference.Remote.SystemOne" />
paket add Themis.Inference.Remote.SystemOne --version 4.7.1
#r "nuget: Themis.Inference.Remote.SystemOne, 4.7.1"
#:package Themis.Inference.Remote.SystemOne@4.7.1
#addin nuget:?package=Themis.Inference.Remote.SystemOne&version=4.7.1
#tool nuget:?package=Themis.Inference.Remote.SystemOne&version=4.7.1
Themis.Inference.Remote.SystemOne
Themis.Inference.Remote.SystemOne maps the System One decision request and
response contract to Themis typed decisions, using
Themis.Inference.Remote.Http for HTTP transport. It has no provider endpoint,
API-key, or vendor-specific defaults.
Registration
Configure the provider's base address and authentication through the returned
IHttpClientBuilder, then route requests to a model available at that endpoint:
using System.Net.Http.Headers;
using System.Text.Json.Nodes;
using Themis.Core;
using Themis.Core.Extensions;
using Themis.Inference.Remote.SystemOne;
services.AddThemisSystemOneDecisionInference()
.ConfigureHttpClient((_, client) =>
{
client.BaseAddress = new Uri("https://inference.example/");
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", apiKey);
});
services.AddThemisDecisionRouter(new DecisionRouterOptions("model-v1")
{
RouteUnspecifiedRequestsToDefaultModel = true
});
The package maps noul, choice, and score questions, validates answer
identities and probability distributions, and maps usage data. Keyed
registrations are available when applications need multiple System One
providers.
Mapping customization
Request callbacks run after the standard System One body is created and before it is sent. Response callbacks run after standard response validation and mapping, and receive a cloned copy of the raw response JSON. Use these hooks for compatible vendor-specific fields while keeping endpoint, authentication, timeouts, retries, and other HTTP policy in host configuration.
services.AddThemisSystemOneDecisionInference(protocol =>
{
protocol.AddRequestCustomizer((request, model, body) =>
{
body["x_vendor"] = new JsonObject { ["explain"] = true };
});
protocol.AddResponseCustomizer((request, model, rawResponse, mapped) =>
{
// Inspect vendor response fields or customize the mapped Themis result.
return mapped;
});
})
.ConfigureHttpClient((_, client) =>
{
client.BaseAddress = new Uri("https://inference.example/");
});
Callbacks are applied in registration order. A response callback must return a
valid DecisionResponse; returning null fails the inference operation.
System One extensions that cannot be represented by Themis' response contract
can be inspected in the raw response, but are not added to that contract by
this package. Customizers belong to the registration call; keyed registrations
can therefore provide distinct mapping behavior.
| 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
- Themis.Common (>= 4.7.1)
- Themis.Core (>= 4.7.1)
- Themis.Inference.Remote.Http (>= 4.7.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Themis.Inference.Remote.SystemOne:
| Package | Downloads |
|---|---|
|
Themis.Inference.Remote.Jev
Jev endpoint and API-key defaults for Themis' shared System One decision adapter. |
GitHub repositories
This package is not used by any popular GitHub repositories.