Package io.jmix.aichat.component.chat
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 Summary
FieldsFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionGenerationFailedEvent(AiChat<T> source, Throwable error, String partialText) Creates the event. -
Method Summary
Modifier and TypeMethodDescriptiongetError()Gets the error.Gets the partial assistant text received before the error.Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, getUI, isFromClient, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Field Details
-
error
-
partialText
-
-
Constructor Details
-
GenerationFailedEvent
Creates the event.- Parameters:
source- the chaterror- the error that ended the generationpartialText- the partial assistant text received before the error; may be empty
-
-
Method Details
-
getError
Gets the error.- Returns:
- the error
-
getPartialText
Gets the partial assistant text received before the error.- Returns:
- the partial text; may be empty, never
null
-