Class GenerationFailedEvent<T extends AiChatMessage>

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

public class GenerationFailedEvent<T extends AiChatMessage> extends com.vaadin.flow.component.ComponentEvent<AiChat<T>>
Fired when a generation ends with an error.
See Also:
  • Field Details

    • error

      protected Throwable error
    • partialText

      protected String partialText
  • Constructor Details

    • GenerationFailedEvent

      public GenerationFailedEvent(AiChat<T> source, Throwable error, String partialText)
      Creates the event.
      Parameters:
      source - the chat
      error - the error that ended the generation
      partialText - the partial assistant text received before the error; may be empty
  • Method Details

    • getError

      public Throwable getError()
      Gets the error.
      Returns:
      the error
    • getPartialText

      public String getPartialText()
      Gets the partial assistant text received before the error.
      Returns:
      the partial text; may be empty, never null