Class HeldSpecialist
- Namespace
- IntentSharp.Specialist
- Assembly
- IntentSharp.Specialist.dll
A specialist a SpecialistRuntime put in use, as its ISpecialistStore holds it: the specialist's name, the definition the service returned, how the specialist is reached, the request it answers and the verdict on it. The runtime keeps one per intent while HoldSpecialists is on, replaces it when another specialist is put in use for the intent, and forgets it on RetireAsync(string, CancellationToken).
public sealed class HeldSpecialist
- Inheritance
-
objectHeldSpecialist
- Inherited Members
-
object.Equals(object)object.Equals(object, object)object.GetHashCode()object.GetType()object.ReferenceEquals(object, object)object.ToString()
- Extension Methods
Remarks
An ensure can put a held specialist in use again without asking the service (see UseHeld): when the offer named a provider configured on the client, from the record alone; when the offer brought a provider of its own, through RecallAsync(HeldSpecialist, CancellationToken).
Constructors
- HeldSpecialist()
Creates an empty record; a store sets every property it reads back.
Properties
- BroughtProvider
True when the offer brought a provider of its own, so putting it in use again needs the service's recall.
- DefinitionText
The definition the service returned and the facts it gave, as JSON intent-file text written by WriteOffer(SpecialistOffer): the facts are in
extensions.specialist.
- FitReport
The verdict on the offer.
- HeldAt
When the specialist was put in use and held.
- IntentName
The intent's name in the runtime's catalog.
- Model
The model the offer asked for, or null.
- Name
The specialist's name exactly as the service gave it (Name), or null when it gave none. FindHeldAsync(string, CancellationToken) finds a record by it.
- OfferHash
The hash that identifies the offer: its definition and how the specialist is reached (OfferHash).
- OfferedProvider
The name of the provider the offer brought, or null when it named a configured provider.
- ProviderName
The name of the configured provider the offer named, or null when the offer brought a provider of its own.
- RequestHash
The request hash of the request the specialist answers.
- Ticket
The ticket of the request the offer answered.
Methods
- ReadDefinition()
The definition the service returned, read from DefinitionText without the
extensions.specialistfacts; a new object on each call.
- ReadOffer(IAIProvider?)
The offer as it was received, read from DefinitionText: with
provideras its provider when the offer brought one, else naming ProviderName.