Events
Add the following line to your scenario code to use the events:
require(Modules.AI);
Constants
DialogflowError
Triggers when a Dialogflow instance causes error.
Parameters
cause:
string
The cause of the event
dialogflow:
Link to the Dialogflow instance
DialogflowPlaybackFinished
Triggers 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
Triggers when 'DialogflowInstance.addMarker' is reached.
Parameters
dialogflow:
Link to the Dialogflow instance
offset:
number
Marker offset
DialogflowPlaybackStarted
Triggers when a playback of a single phrase is started.
Parameters
dialogflow:
Link to the Dialogflow instance
duration:
number
Playback duration
DialogflowQueryResult
Triggers 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
Triggers 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's false, the StreamingRecognitionResult represents an interim result that may change. If it's true, the recognizer will not return any further hypotheses about this piece of the audio.
DialogflowResponse
Triggers when a Dialogflow instance returns an intent response.
Parameters
dialogflow:
Link to the Dialogflow instance
response:
The intent response
DialogflowStopped
Triggers when a Dialogflow instance is stopped.
Parameters
cause:
string
The cause of the event
dialogflow:
Link to the Dialogflow instance
VoicemailDetected
Triggers 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.