Record Class OutputGuardrailResult
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.guardrails.OutputGuardrailResult
- Record Components:
result
- The result of the output guardrail validation.failures
- The list of failures, empty if the validation succeeded.
- All Implemented Interfaces:
GuardrailResult<OutputGuardrailResult>
@Deprecated(forRemoval=true)
public record OutputGuardrailResult(GuardrailResult.Result result, String successfulText, Object successfulResult, List<OutputGuardrailResult.Failure> failures)
extends Record
implements GuardrailResult<OutputGuardrailResult>
Deprecated, for removal: This API element is subject to removal in a future version.
The result of the validation of an
OutputGuardrail
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Deprecated, for removal: This API element is subject to removal in a future version.Nested classes/interfaces inherited from interface io.quarkiverse.langchain4j.guardrails.GuardrailResult
GuardrailResult.Result
-
Constructor Summary
ConstructorsConstructorDescriptionOutputGuardrailResult
(GuardrailResult.Result result, String successfulText, Object successfulResult, List<OutputGuardrailResult.Failure> failures) Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance of aOutputGuardrailResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.final boolean
Deprecated, for removal: This API element is subject to removal in a future version.Indicates whether some other object is "equal to" this one.static OutputGuardrailResult
failure
(List<? extends GuardrailResult.Failure> failures) Deprecated, for removal: This API element is subject to removal in a future version.failures()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of thefailures
record component.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.final int
hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.Returns a hash code value for this object.boolean
isFatal()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isRetry()
Deprecated, for removal: This API element is subject to removal in a future version.result()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theresult
record component.static OutputGuardrailResult
success()
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of thesuccessfulResult
record component.Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of thesuccessfulText
record component.static OutputGuardrailResult
successWith
(String successfulText) Deprecated, for removal: This API element is subject to removal in a future version.static OutputGuardrailResult
successWith
(String successfulText, Object successfulResult) Deprecated, for removal: This API element is subject to removal in a future version.toString()
Deprecated, for removal: This API element is subject to removal in a future version.Returns a string representation of this record class.validatedBy
(Class<? extends Guardrail> guardrailClass) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.quarkiverse.langchain4j.guardrails.GuardrailResult
getFirstFailureException, hasRewrittenResult, isSuccess
-
Constructor Details
-
OutputGuardrailResult
public OutputGuardrailResult(GuardrailResult.Result result, String successfulText, Object successfulResult, List<OutputGuardrailResult.Failure> failures) Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance of aOutputGuardrailResult
record class.
-
-
Method Details
-
success
Deprecated, for removal: This API element is subject to removal in a future version. -
successWith
Deprecated, for removal: This API element is subject to removal in a future version. -
successWith
Deprecated, for removal: This API element is subject to removal in a future version. -
failure
Deprecated, for removal: This API element is subject to removal in a future version. -
getResult
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getResult
in interfaceGuardrailResult<OutputGuardrailResult>
-
isRetry
public boolean isRetry()Deprecated, for removal: This API element is subject to removal in a future version. -
blockRetry
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
blockRetry
in interfaceGuardrailResult<OutputGuardrailResult>
-
getReprompt
Deprecated, for removal: This API element is subject to removal in a future version. -
isFatal
public boolean isFatal()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isFatal
in interfaceGuardrailResult<OutputGuardrailResult>
-
validatedBy
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
validatedBy
in interfaceGuardrailResult<OutputGuardrailResult>
-
toString
Deprecated, for removal: This API element is subject to removal in a future version.Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Deprecated, for removal: This API element is subject to removal in a future version.Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Deprecated, for removal: This API element is subject to removal in a future version.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. All components in this record class are compared withObjects::equals(Object,Object)
. -
result
-
successfulText
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of thesuccessfulText
record component.- Specified by:
successfulText
in interfaceGuardrailResult<OutputGuardrailResult>
- Returns:
- the value of the
successfulText
record component
-
successfulResult
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of thesuccessfulResult
record component.- Specified by:
successfulResult
in interfaceGuardrailResult<OutputGuardrailResult>
- Returns:
- the value of the
successfulResult
record component
-
failures
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of thefailures
record component.- Specified by:
failures
in interfaceGuardrailResult<OutputGuardrailResult>
- Returns:
- the value of the
failures
record component
-
OutputGuardrailResult
instead