Interface AiServiceListener<T extends AiServiceEvent>

Type Parameters:
T - The type of AiServiceEvent this listener listens for
All Known Subinterfaces:
AiServiceCompletedListener, AiServiceErrorListener, AiServiceResponseReceivedListener, AiServiceStartedListener, GuardrailExecutedListener<E,P,R,G>, InputGuardrailExecutedListener, OutputGuardrailExecutedListener, ToolExecutedEventListener

public interface AiServiceListener<T extends AiServiceEvent>
A AiServiceEvent listener that listens for
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the class object representing the type of AiServiceEvent that this listener listens for.
    void
    onEvent(T event)
    Called when an event of type AiServiceEvent occurs.
  • Method Details

    • getEventClass

      Class<T> getEventClass()
      Retrieves the class object representing the type of AiServiceEvent that this listener listens for.
      Returns:
      the Class object of the event type that this listener is associated with
    • onEvent

      void onEvent(T event)
      Called when an event of type AiServiceEvent occurs.
      Parameters:
      event - The event instance that occurred, encapsulating specific information about the invocation.