Interface InputGuardrailExecutedEvent
- All Superinterfaces:
AiServiceEvent, GuardrailExecutedEvent<InputGuardrailRequest, InputGuardrailResult, InputGuardrail>
- All Known Implementing Classes:
DefaultInputGuardrailExecutedEvent
public interface InputGuardrailExecutedEvent
extends GuardrailExecutedEvent<InputGuardrailRequest, InputGuardrailResult, InputGuardrail>
Represents an event that is triggered upon the execution of an input guardrail validation.
This interface extends
GuardrailExecutedEvent
and ties specifically to input-based
guardrail validations.
It provides methods to access information such as the request details, result, and the
associated input guardrail, all encapsulating the logic for validating input interactions
within the system.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Builder forInputGuardrailExecutedEvent
instances.Nested classes/interfaces inherited from interface AiServiceEvent
AiServiceEvent.Builder<T>
Nested classes/interfaces inherited from interface GuardrailExecutedEvent
GuardrailExecutedEvent.GuardrailExecutedEventBuilder<P,
R, G, T> -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Class
<InputGuardrailExecutedEvent> Retrieves the class type of the event, representing the specific category of the AI Service invocation event.Retrieves a rewritten user message if a successful rewritten result exists.Creates a new builder instance initialized with the properties of thisAiServiceEvent
.Methods inherited from interface AiServiceEvent
invocationContext
Methods inherited from interface GuardrailExecutedEvent
guardrailClass, request, result
-
Method Details
-
rewrittenUserMessage
UserMessage rewrittenUserMessage()Retrieves 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.- Returns:
- The rewritten user message if a rewritten result exists; otherwise, the original user message.
-
eventClass
Description copied from interface:AiServiceEvent
Retrieves the class type of the event, representing the specific category of the AI Service invocation event.- Specified by:
eventClass
in interfaceAiServiceEvent
-
toBuilder
Description copied from interface:AiServiceEvent
Creates a new builder instance initialized with the properties of thisAiServiceEvent
. This allows modification of the existing properties and reconstruction of the event.- Specified by:
toBuilder
in interfaceAiServiceEvent
-
builder
-