Record Class DefaultInputGuardrailExecutedEvent
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.audit.guardrails.internal.DefaultInputGuardrailExecutedEvent
- All Implemented Interfaces:
GuardrailExecutedEvent<dev.langchain4j.guardrail.InputGuardrailRequest,,dev.langchain4j.guardrail.InputGuardrailResult, dev.langchain4j.guardrail.InputGuardrail> InputGuardrailExecutedEvent,LLMInteractionEvent
@Deprecated(forRemoval=true)
public record DefaultInputGuardrailExecutedEvent(AuditSourceInfo sourceInfo, dev.langchain4j.guardrail.InputGuardrailRequest request, dev.langchain4j.guardrail.InputGuardrailResult result, Class<dev.langchain4j.guardrail.InputGuardrail> guardrailClass)
extends Record
implements InputGuardrailExecutedEvent
Deprecated, for removal: This API element is subject to removal in a future version.
In favor of https://docs.langchain4j.dev/tutorials/observability#ai-service-observability
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultInputGuardrailExecutedEvent(AuditSourceInfo sourceInfo, dev.langchain4j.guardrail.InputGuardrailRequest request, dev.langchain4j.guardrail.InputGuardrailResult result, Class<dev.langchain4j.guardrail.InputGuardrail> guardrailClass) Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance of aDefaultInputGuardrailExecutedEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanDeprecated, for removal: This API element is subject to removal in a future version.Indicates whether some other object is "equal to" this one.Class<dev.langchain4j.guardrail.InputGuardrail> Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theguardrailClassrecord component.final inthashCode()Deprecated, for removal: This API element is subject to removal in a future version.Returns a hash code value for this object.dev.langchain4j.guardrail.InputGuardrailRequestrequest()Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of therequestrecord component.dev.langchain4j.guardrail.InputGuardrailResultresult()Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theresultrecord component.dev.langchain4j.data.message.UserMessageDeprecated, for removal: This API element is subject to removal in a future version.Retrieves a rewritten user message if a successful rewritten result exists.Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of thesourceInforecord component.final StringtoString()Deprecated, for removal: This API element is subject to removal in a future version.Returns a string representation of this record class.
-
Constructor Details
-
DefaultInputGuardrailExecutedEvent
public DefaultInputGuardrailExecutedEvent(AuditSourceInfo sourceInfo, dev.langchain4j.guardrail.InputGuardrailRequest request, dev.langchain4j.guardrail.InputGuardrailResult result, Class<dev.langchain4j.guardrail.InputGuardrail> guardrailClass) Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance of aDefaultInputGuardrailExecutedEventrecord class.- Parameters:
sourceInfo- the value for thesourceInforecord componentrequest- the value for therequestrecord componentresult- the value for theresultrecord componentguardrailClass- the value for theguardrailClassrecord component
-
-
Method Details
-
rewrittenUserMessage
public dev.langchain4j.data.message.UserMessage rewrittenUserMessage()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:InputGuardrailExecutedEventRetrieves a rewritten user message if a successful rewritten result exists. If the result contains a rewritten message, it constructs a new user message with the rewritten text; otherwise, it returns the original user message.- Specified by:
rewrittenUserMessagein interfaceInputGuardrailExecutedEvent- Returns:
- The rewritten user message if a rewritten result exists; otherwise, the original user message.
-
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). -
sourceInfo
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of thesourceInforecord component.- Specified by:
sourceInfoin interfaceLLMInteractionEvent- Returns:
- the value of the
sourceInforecord component
-
request
public dev.langchain4j.guardrail.InputGuardrailRequest request()Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of therequestrecord component.- Specified by:
requestin interfaceGuardrailExecutedEvent<dev.langchain4j.guardrail.InputGuardrailRequest,dev.langchain4j.guardrail.InputGuardrailResult, dev.langchain4j.guardrail.InputGuardrail> - Returns:
- the value of the
requestrecord component
-
result
public dev.langchain4j.guardrail.InputGuardrailResult result()Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theresultrecord component.- Specified by:
resultin interfaceGuardrailExecutedEvent<dev.langchain4j.guardrail.InputGuardrailRequest,dev.langchain4j.guardrail.InputGuardrailResult, dev.langchain4j.guardrail.InputGuardrail> - Returns:
- the value of the
resultrecord component
-
guardrailClass
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theguardrailClassrecord component.- Specified by:
guardrailClassin interfaceGuardrailExecutedEvent<dev.langchain4j.guardrail.InputGuardrailRequest,dev.langchain4j.guardrail.InputGuardrailResult, dev.langchain4j.guardrail.InputGuardrail> - Returns:
- the value of the
guardrailClassrecord component
-