Interface RequestListener
- All Superinterfaces:
Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Listener for request submission events.
The listener is called on every prompt, just before the LLM stream opens —
the same lifecycle moment as AIController.onRequest(). Use it to
persist the outbound request (the user message, any attachments) or to
correlate the assigned messageId with downstream events such as
AttachmentClickListener and the messageId stored in
ChatMessage.messageId().
Threading: the listener is called on the UI thread under the session
lock. Long-running work should be offloaded to a worker; UI updates do not
need an extra ui.access(...) hop.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classEvent fired just before the LLM stream opens for a prompt. -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled just before the LLM stream opens for a prompt.
-
Method Details
-
onRequest
Called just before the LLM stream opens for a prompt.- Parameters:
event- the request event
-