import {connect} from 'diarupt';... const next = (event, data) => { // handle events console.log(event, data); } // starts the interaction await connect( session_id, options, next )...
Javascript
Events
Interaction Events
Copy
import {connect} from 'diarupt';... const next = (event, data) => { // handle events console.log(event, data); } // starts the interaction await connect( session_id, options, next )...
Interaction Events are events that are triggered when interaction with and AI. These event help you manage state and other workflows in your application.See Connect on how to handle these events
This event is triggered when the Interaction connection is close. This can happen for a number of reasons, including the user closing the browser tab or window, calling the disconnect function, or the connection being lost.