Class SpecialistOptions
- Namespace
- IntentSharp.Specialist
- Assembly
- IntentSharp.Specialist.dll
The settings of a SpecialistRuntime, client-wide, with overrides for single intents in Intents. Every value can be changed; the defaults are listed on each property.
public sealed class SpecialistOptions
- Inheritance
-
objectSpecialistOptions
- Inherited Members
-
object.Equals(object)object.Equals(object, object)object.GetHashCode()object.GetType()object.ReferenceEquals(object, object)object.ToString()
- Extension Methods
Constructors
- SpecialistOptions()
Creates options with the defaults: the run waits, 30-second waits asked every second, 3 further waits, 3 requests per hour per intent, the definition comparison only.
Fields
- DefaultCharactersPerToken
The default number of characters counted as one token: 3.
- DefaultWaitPollInterval
The default pause between two asks within one wait: 1 second.
- DefaultWaitTimeout
The default length of one wait: 30 seconds.
Properties
- AIJudge
Turns on the AI fit judge for every intent and says who judges. Default null: off.
- CharactersPerToken
How many characters of serialized input count as one token when a specialist declares the most input tokens it accepts (MaxInputTokens), greater than zero. Default 3. The running definition's
maxInputCharsbecomes those tokens times this factor, or its own value when that is lower, so a larger input is refused before any model call with the limit in the message. It counts the serialized input only, not the instructions, and a settings document'sclient.maxInputCharsstill beats it.
- ContextSources
The sources of the context sent with every request. Default empty.
- FitEvaluators
The fit evaluators every offer goes through, in order. Default: the DefinitionComparisonEvaluator only. An empty list accepts every offer, except for the AI judge when it is on.
- GuardrailSets
The guardrail sets every request to the specialist service is checked against, at the Checkpoint checkpoint, before it is sent. Default empty: no check is made. When sets are named, a refusal throws SpecialistGuardrailException and nothing is sent, and their
settings:blocks apply. Either way a file's value of a declared specialist setting (Settings), from a named set or the settings document, beats the value in these options.
- HoldSpecialists
Whether the runtime keeps a held record (HeldSpecialist) in its ISpecialistStore when it puts a specialist in use: the specialist's name, the definition the service returned, how the specialist is reached, the hashes and the fit report. Default true. False keeps none, so nothing can be recalled from the store and ListHeldAsync(CancellationToken) lists nothing for the intents it covers.
- Intents
Overrides for single intents, by intent name (compared ignoring case).
- KeepPrevious
Whether calls keep running on the specialist in use while a changed request is handled in the background. Default Never: callers wait for the new specialist. Null counts as never.
- MaxRequestsPerHour
The most requests made for one intent in any hour, at least 1. Default 3. A request past it throws SpecialistRequestLimitException and is not sent.
- NotFitHandler
Decides what happens after an offer does not fit. Default null: the run or the ensure throws SpecialistNotFitException.
- Requirements
The requirements sent with every request, in a form the service understands. Default null: an empty object.
- UseHeld
Whether an ensure puts a fitting held specialist in use from the store before it requests or waits. Default Use. Never leaves held records unused, so an ensure behaves as it does without them. Null counts as Use.
- WaitOn
When specialists are requested and waited for. Default IntentCall.
- WaitPollInterval
The pause before asking the service again when it answers "not yet" before the wait ends, greater than zero. Default 1 second. A pause never runs past the end of the wait.
- WaitRetries
The further waits after the first, 0 or more, before the call fails with SpecialistWaitTimeoutException. Default 3, so a call waits at most four times WaitTimeout.
- WaitTimeout
The length of one wait, greater than zero. Default 30 seconds. A wait lasts this long unless an offer arrives first, whether the service holds each call open or answers "not yet" at once.