Method EvaluateAsync
- Namespace
- IntentSharp.Guardrails
- Assembly
- IntentSharp.dll
EvaluateAsync(SubjectName, JsonNode?, JsonNode?, GuardrailKindContext, CancellationToken)
Checks value against the rule's argument.
ValueTask<GuardrailKindResult> EvaluateAsync(SubjectName subject, JsonNode? value, JsonNode? settings, GuardrailKindContext context, CancellationToken ct = default)
Parameters
subjectSubjectNameThe subject being checked, for messages.
valueJsonNodeThe subject's value.
settingsJsonNodeThe rule's argument as written.
contextGuardrailKindContextWhat the check knows about the operation: the checkpoint, the resolved settings and the described entities.
ctCancellationTokenCancels the evaluation.
Returns
- ValueTask<GuardrailKindResult>
Whether the value passes, and the problems when it does not.