Record Class OutputGuardrailResult.Failure
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.guardrails.OutputGuardrailResult.Failure
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncause()Returns the value of thecauserecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theguardrailClassrecord component.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.reprompt()Returns the value of therepromptrecord component.booleanretry()Returns the value of theretryrecord component.toString()Returns a string representation of this record class.withGuardrailClass(Class<? extends Guardrail> guardrailClass)
-
Constructor Details
-
Failure
-
Failure
-
Failure
-
Failure
-
Failure
public Failure(String message, Throwable cause, Class<? extends Guardrail> guardrailClass, boolean retry, String reprompt) Creates an instance of aFailurerecord class.- Parameters:
message- the value for themessagerecord componentcause- the value for thecauserecord componentguardrailClass- the value for theguardrailClassrecord componentretry- the value for theretryrecord componentreprompt- the value for therepromptrecord component
-
-
Method Details
-
withGuardrailClass
- Specified by:
withGuardrailClassin interfaceGuardrailResult.Failure
-
blockRetry
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
message
Returns the value of themessagerecord component.- Specified by:
messagein interfaceGuardrailResult.Failure- Returns:
- the value of the
messagerecord component
-
cause
Returns the value of thecauserecord component.- Specified by:
causein interfaceGuardrailResult.Failure- Returns:
- the value of the
causerecord component
-
guardrailClass
Returns the value of theguardrailClassrecord component.- Specified by:
guardrailClassin interfaceGuardrailResult.Failure- Returns:
- the value of the
guardrailClassrecord component
-
retry
public boolean retry()Returns the value of theretryrecord component.- Returns:
- the value of the
retryrecord component
-
reprompt
Returns the value of therepromptrecord component.- Returns:
- the value of the
repromptrecord component
-