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
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEvent emitted when partial responses have been accumulated into a larget message.static classEvent emitted when a tool is about to be executed during a chat conversation.static classEvent emitted when a chat conversation has been completed.static enumEnumeration of possible chat event types.static classEvent emitted when content has been fetched from a retrieval-augmented generation (RAG) source.static classEvent emitted when a partial response chunk is received during streaming.static classEvent emitted when a partial thinking/reasoning chunk is received during streaming.static classEvent emitted when a tool has been executed during a chat conversation. -
Constructor Summary
ConstructorsConstructorDescriptionChatEvent(ChatEvent.ChatEventType eventType) Constructs a new ChatEvent with the specified event type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of this chat event.
-
Constructor Details
-
ChatEvent
Constructs a new ChatEvent with the specified event type.- Parameters:
eventType- the type of chat event
-
-
Method Details
-
getEventType
Returns the type of this chat event.- Returns:
- the event type
-