Class ResponseListener.ResponseEvent
java.lang.Object
com.vaadin.flow.component.ai.orchestrator.ResponseListener.ResponseEvent
- All Implemented Interfaces:
Serializable
- Enclosing interface:
ResponseListener
Event fired after the assistant's stream has completed, on success or
failure.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetError()Gets the failure cause if the turn ended with an error.Gets the assistant's response text.
-
Method Details
-
getResponse
Gets the assistant's response text. On success this is the full text (may be empty when the model emitted only tool calls); on failure this is whatever partial stream was received before the error, possibly empty.- Returns:
- the response text, never
null
-
getError
Gets the failure cause if the turn ended with an error. Returns an empty optional on a successful turn.- Returns:
- the failure cause, or empty on success
-