Enum Class GuardrailResult.Result

java.lang.Object
java.lang.Enum<GuardrailResult.Result>
dev.langchain4j.guardrail.GuardrailResult.Result
All Implemented Interfaces:
Serializable, Comparable<GuardrailResult.Result>, Constable
Enclosing interface:
GuardrailResult<GR extends GuardrailResult<GR>>

public static enum GuardrailResult.Result extends Enum<GuardrailResult.Result>
The possible results of a guardrails validation.
  • Enum Constant Details

    • SUCCESS

      public static final GuardrailResult.Result SUCCESS
      A successful validation.
    • SUCCESS_WITH_RESULT

      public static final GuardrailResult.Result SUCCESS_WITH_RESULT
      A successful validation with a specific result.
    • FAILURE

      public static final GuardrailResult.Result FAILURE
      A failed validation not preventing the subsequent validations eventually registered to be evaluated.
    • FATAL

      public static final GuardrailResult.Result FATAL
      A fatal failed validation, blocking the evaluation of any other validations eventually registered.
  • Method Details

    • values

      public static GuardrailResult.Result[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GuardrailResult.Result valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null