Interface GuardrailResult<GR extends GuardrailResult>
- All Known Implementing Classes:
InputGuardrailResult
,OutputGuardrailResult
public interface GuardrailResult<GR extends GuardrailResult>
The result of the validation of an interaction between a user and the LLM.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
The message and the cause of the failure of a single validation.static enum
The possible results of a guardrails validation. -
Method Summary
Modifier and TypeMethodDescriptionList
<? extends GuardrailResult.Failure> failures()
default Throwable
boolean
isFatal()
boolean
validatedBy
(Class<? extends Guardrail> guardrailClass)
-
Method Details
-
isSuccess
boolean isSuccess() -
isFatal
boolean isFatal() -
failures
List<? extends GuardrailResult.Failure> failures()- Returns:
- The list of failures eventually resulting from a set of validations.
-
getFirstFailureException
-
validatedBy
-