AvatarState
Avatar state object that describes a state and implements the logic of transitions and reactions.
Props
beforeExit
beforeExit: (event: AvatarStateChangeEvent) => void,Promise<void>
| undefined
Callback function when the dialogue leaves the state
name
name: string
State name
onEnter
onEnter: (event: AvatarStateChangeEvent) => AvatarResponse,Promise<AvatarResponse>
| undefined
Callback function when the dialogue enters the state
onTimeout
onTimeout: (event: AvatarTimeoutEvent) => AvatarResponse,Promise<AvatarResponse>
onUtterance
onUtterance: (event: AvatarUtteranceEvent) => AvatarResponse,Promise<AvatarResponse>
Triggered when the dialogue is in this state and a customer says a phrase
utteranceCounter
utteranceCounter: number
Number of user phrases processed in this state. This counter resets when changing the state to any other (or the same) one
visitsCounter
visitsCounter: number
Number of the state visits