The connect function is used to setup a new webrtc connection to Diarupt Engine. It is required to initiate an AI interaction on the client.

Parameters

session_id
string
required

The session_id is a unique identifier for the current session. It is used to identify the interactions session on the server. It can be retrieved when you create a new session.

options
object
required

Connection options

next
function
required

The next callback is called when an event occurs on the connection. It is used to handle the interaction events. See Interaction Events for more details

Returns

void
Promise<void>

The connect function returns Promise of type void