SpokestackTrayListener

interface SpokestackTrayListener

An interface for classes that wish to receive events from the Spokestack tray.

For trace messages, the tray dispatches those that meet or exceed the logging level specified in tray configuration. Errors are dispatched via onError.

All methods have a default implementation, so adopters can choose those relevant to their use case.

See also

io.spokestack.spokestack.util.EventTracer.Level

Functions

onClassification
Link copied to clipboard
open fun onClassification(result: NLUResult): Prompt?
Spokestack's NLU classified an utterance.
onClose
Link copied to clipboard
open fun onClose()
The tray UI closed.
onDialogueEvent
Link copied to clipboard
open fun onDialogueEvent(event: DialogueEvent): Prompt?
Spokestack's dialogue manager emitted an event.
onError
Link copied to clipboard
open fun onError(error: Throwable)
Spokestack encountered an error.
onLog
Link copied to clipboard
open fun onLog(message: String)
A log message was received from Spokestack.
onOpen
Link copied to clipboard
open fun onOpen()
The tray UI opened.