Class ChatEvent

java.lang.Object
io.quarkiverse.langchain4j.runtime.aiservice.ChatEvent
Direct Known Subclasses:
ChatEvent.AccumulatedResponseEvent, ChatEvent.BeforeToolExecutionEvent, ChatEvent.ChatCompletedEvent, ChatEvent.ContentFetchedEvent, ChatEvent.PartialResponseEvent, ChatEvent.PartialThinkingEvent, ChatEvent.ToolExecutedEvent

public class ChatEvent extends Object
Base class for chat-related events that occur during AI service interactions. This class serves as the foundation for various event types that can be emitted during the lifecycle of a chat conversation, including tool executions, partial responses, and completion events.

Events are typically used for monitoring, logging, or reactive processing of AI service interactions.

See Also:
  • Constructor Details

    • ChatEvent

      public ChatEvent(ChatEvent.ChatEventType eventType)
      Constructs a new ChatEvent with the specified event type.
      Parameters:
      eventType - the type of chat event
  • Method Details

    • getEventType

      public ChatEvent.ChatEventType getEventType()
      Returns the type of this chat event.
      Returns:
      the event type