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 interfaceThe message and the cause of the failure of a single validation.static enumThe possible results of a guardrails validation. -
Method Summary
Modifier and TypeMethodDescriptionList<? extends GuardrailResult.Failure> failures()default ThrowablebooleanisFatal()booleanvalidatedBy(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
-