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
clientIntentClientThe client every run, probe and judge call is sent through.
catalogIIntentCatalogThe catalog of the requested definitions, read on every call.
serviceISpecialistServiceThe specialist service.
optionsSpecialistOptionsThe settings. Null uses the defaults. They are checked here and read again on every call.
routerSpecialistRouterThe 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.
storeISpecialistStoreWhere requests, offers and fit reports are kept. Null uses a new InMemorySpecialistStore.
validatorsIIntentValidatorRegistryThe validators returned definitions may name, as for IntentRuntime. Null means none.
typesIIntentTypeRegistryThe types clr shapes of returned definitions may name, as for IntentRuntime. Null means none.
timeProviderTimeProviderThe clock for request times, waits and the pauses between asks. Null uses the system clock.
loggerILogger<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,catalogorserviceis 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.