Method AddSpecialistGuardrails
- Namespace
- IntentSharp.Specialist
- Assembly
- IntentSharp.Specialist.dll
AddSpecialistGuardrails(IntentClientBuilder)
Declares the four specialist settings of Settings with
AddSetting(SettingDescriptor) and the six subjects of Subjects
with AddSubject(SubjectDescriptor), so the settings document and a rule set's settings:
block can set the settings, and every check of the client knows the subjects. Call it once per builder.
public static IntentClientBuilder AddSpecialistGuardrails(this IntentClientBuilder builder)
Parameters
builderIntentClientBuilderThe builder.
Returns
- IntentClientBuilder
The builder, so calls can be chained.
Remarks
A rule file source from the Guardrails package's WithGuardrailFiles receives these declarations when the
client is built, whether this method is called before or after it, so a rule file's settings: block may set
a specialist setting and its rules may name a specialist subject with nothing declared again. Declaring them in that
source's options as well is not an error, since they are the same descriptors. Under dependency injection,
AddGuardrailDeclarations declares them to the client and to a rule file
source at once.
Exceptions
- ArgumentNullException
builderis null.- ArgumentException
One of the settings or subjects is already declared on the builder.