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 thecause
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theguardrailClass
record component.final int
hashCode()
Returns a hash code value for this object.message()
Returns the value of themessage
record component.reprompt()
Returns the value of thereprompt
record component.boolean
retry()
Returns the value of theretry
record 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 aFailure
record class.- Parameters:
message
- the value for themessage
record componentcause
- the value for thecause
record componentguardrailClass
- the value for theguardrailClass
record componentretry
- the value for theretry
record componentreprompt
- the value for thereprompt
record component
-
-
Method Details
-
withGuardrailClass
- Specified by:
withGuardrailClass
in 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 thecompare
method from their corresponding wrapper classes. -
message
Returns the value of themessage
record component.- Specified by:
message
in interfaceGuardrailResult.Failure
- Returns:
- the value of the
message
record component
-
cause
Returns the value of thecause
record component.- Specified by:
cause
in interfaceGuardrailResult.Failure
- Returns:
- the value of the
cause
record component
-
guardrailClass
Returns the value of theguardrailClass
record component.- Specified by:
guardrailClass
in interfaceGuardrailResult.Failure
- Returns:
- the value of the
guardrailClass
record component
-
retry
public boolean retry()Returns the value of theretry
record component.- Returns:
- the value of the
retry
record component
-
reprompt
Returns the value of thereprompt
record component.- Returns:
- the value of the
reprompt
record component
-