Documentation
Table of Contents

Constructor SpecialistRuntime

Namespace
IntentSharp.Specialist
Assembly
IntentSharp.Specialist.dll

SpecialistRuntime(IntentClient, IIntentCatalog, ISpecialistService, SpecialistOptions?, SpecialistRouter?, ISpecialistStore?, IIntentValidatorRegistry?, IIntentTypeRegistry?, TimeProvider?, ILogger<SpecialistRuntime>?)

Creates a runtime.

public SpecialistRuntime(IntentClient client, IIntentCatalog catalog, ISpecialistService service, SpecialistOptions? options = null, SpecialistRouter? router = null, ISpecialistStore? store = null, IIntentValidatorRegistry? validators = null, IIntentTypeRegistry? types = null, TimeProvider? timeProvider = null, ILogger<SpecialistRuntime>? logger = null)

Parameters

client IntentClient

The client every run, probe and judge call is sent through.

catalog IIntentCatalog

The catalog of the requested definitions, read on every call.

service ISpecialistService

The specialist service.

options SpecialistOptions

The settings. Null uses the defaults. They are checked here and read again on every call.

router SpecialistRouter

The router for offers that bring a provider of their own. Add the same instance to the client with AddProvider(IAIProvider), so the client reaches it by name only. Null when every offer names a provider already configured on the client.

store ISpecialistStore

Where requests, offers and fit reports are kept. Null uses a new InMemorySpecialistStore.

validators IIntentValidatorRegistry

The validators returned definitions may name, as for IntentRuntime. Null means none.

types IIntentTypeRegistry

The types clr shapes of returned definitions may name, as for IntentRuntime. Null means none.

timeProvider TimeProvider

The clock for request times, waits and the pauses between asks. Null uses the system clock.

logger ILogger<SpecialistRuntime>

Receives a Warning when the service fails to take a fit report, and when a change handled in the background under keep-previous stops on a problem. Null logs nothing.

Exceptions

ArgumentNullException

client, catalog or service is null.

ArgumentException

The AI fit judge is turned on without naming a model, client-wide or for an intent, or an intent override is null.

ArgumentOutOfRangeException

A wait timeout or a pause between asks is not greater than zero, a retry count is negative, a request limit is less than 1, or a characters-per-token factor is not a number greater than zero.