Interface GuardrailExecutedEvent<P extends GuardrailRequest<P>, R extends GuardrailResult<R>, G extends Guardrail<P,R>>

Type Parameters:
P - the type of guardrail parameters used in the validation process
R - the type of guardrail result produced by the validation process
G - the type of guardrail class used in the validation process
All Superinterfaces:
AiServiceEvent
All Known Subinterfaces:
InputGuardrailExecutedEvent, OutputGuardrailExecutedEvent
All Known Implementing Classes:
DefaultGuardrailExecutedEvent, DefaultInputGuardrailExecutedEvent, DefaultOutputGuardrailExecutedEvent

public interface GuardrailExecutedEvent<P extends GuardrailRequest<P>, R extends GuardrailResult<R>, G extends Guardrail<P,R>> extends AiServiceEvent
Represents an event that is executed when a guardrail validation occurs. This interface serves as a marker for events that contain both parameters and results associated with guardrail validation.
  • Method Details

    • request

      P request()
      Retrieves the request used for input guardrail validation.
      Returns:
      the parameters containing user message, memory, augmentation result, user message template, and associated variables for input guardrail validation.
    • result

      R result()
      Retrieves the result of the input guardrail validation process.
      Returns:
      the result of the input guardrail validation, including the validation outcome and any associated failures, if present.
    • guardrailClass

      Class<G> guardrailClass()
      Retrieves the guardrail class associated with the validation process.
      Returns:
      the guardrail class that implements the logic for validating the interaction between user and LLM, represented as an instance of the type extending Guardrail<P, R>.