Events
Add the following line to your scenario code to use the events:
require(Modules.AI);
Constants
DialogflowError
Triggered when a Dialogflow instance causes error.
Parameters
cause:
string
The cause of the event
dialogflow:
Link to the Dialogflow instance
DialogflowPlaybackFinished
Triggered when a playback of a single phrase is finished successfully or in case of playback error.
Parameters
dialogflow:
Link to the Dialogflow instance
error:
string
Optional
DialogflowPlaybackMarkerReached
Triggered when 'DialogflowInstance.addMarker' is reached.
Parameters
dialogflow:
Link to the Dialogflow instance
offset:
number
Marker offset
DialogflowPlaybackStarted
Triggered when a playback of a single phrase is started.
Parameters
dialogflow:
Link to the Dialogflow instance
duration:
number
Playback duration
DialogflowQueryResult
Triggered when a Dialogflow instance returns a query result.
Parameters
dialogflow:
Link to the Dialogflow instance
result:
The results of the conversational query or event processing
DialogflowRecognitionResult
Triggered when a Dialogflow instance returns a recognition result.
Parameters
dialogflow:
Link to the Dialogflow instance
isFinal:
boolean
The default of 0.0 is a sentinel value indicating confidence was not set. If it is false, the StreamingRecognitionResult represents an interim result that may change. If it is true, the recognizer does not return any further hypotheses about this piece of the audio.
DialogflowResponse
Triggered when a Dialogflow instance returns an intent response.
Parameters
dialogflow:
Link to the Dialogflow instance
response:
The intent response
DialogflowStopped
Triggered when a Dialogflow instance is stopped.
Parameters
cause:
string
The cause of the event
dialogflow:
Link to the Dialogflow instance
VoicemailDetected
Triggered when an answering machine or voicemail is detected.
Parameters
call:
Call that triggers the event
confidence:
number
Recognition confidence. Values range from 0 (completely uncertain) to 100 (completely certain). The value is not guaranteed to be accurate, consider it while handling the event.