Interface GuardrailExecutedEvent<P extends dev.langchain4j.guardrail.GuardrailRequest,R extends dev.langchain4j.guardrail.GuardrailResult<R>,G extends dev.langchain4j.guardrail.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
All Superinterfaces:
LLMInteractionEvent
All Known Subinterfaces:
InputGuardrailExecutedEvent, OutputGuardrailExecutedEvent
All Known Implementing Classes:
DefaultInputGuardrailExecutedEvent, DefaultOutputGuardrailExecutedEvent

public interface GuardrailExecutedEvent<P extends dev.langchain4j.guardrail.GuardrailRequest,R extends dev.langchain4j.guardrail.GuardrailResult<R>,G extends dev.langchain4j.guardrail.Guardrail<P,R>> extends LLMInteractionEvent
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 Summary

    Modifier and Type
    Method
    Description
    Retrieves the guardrail class associated with the validation process.
    Retrieves the request used for input guardrail validation.
    Retrieves the result of the input guardrail validation process.

    Methods inherited from interface io.quarkiverse.langchain4j.audit.LLMInteractionEvent

    sourceInfo
  • 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>.