Class GenerationStateChangeEvent<T extends AiChatMessage>

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<AiChat<T>>
io.jmix.aichat.component.chat.GenerationStateChangeEvent<T>
Type Parameters:
T - the application's message type
All Implemented Interfaces:
Serializable

public class GenerationStateChangeEvent<T extends AiChatMessage> extends com.vaadin.flow.component.ComponentEvent<AiChat<T>>
Fired on every GenerationState transition.
See Also:
  • Field Details

  • Constructor Details

    • GenerationStateChangeEvent

      public GenerationStateChangeEvent(AiChat<T> source, GenerationState oldState, GenerationState newState)
      Creates the event.
      Parameters:
      source - the chat
      oldState - the previous state
      newState - the new state
  • Method Details

    • getOldState

      public GenerationState getOldState()
      Gets the previous state.
      Returns:
      the previous state
    • getNewState

      public GenerationState getNewState()
      Gets the new state.
      Returns:
      the new state