Rate this page:

Conversation

This class represents a CCAI Conversation instance. Add the following line to your scenario code to use the class: require(Modules.AI);

Constructors

constructor

Copy URL

Parameters

Methods

addEventListener

Copy URL
addEventListener(event: 

Conversation

,
callback:

Function

):

void

Add a handler for a specific event generated by the specified CCAI Conversation instance. Use only functions as handlers; anything except a function leads to an error and scenario termination when a handler is called.

Parameters

  • Event class

  • callback:

    Function

    Handler function

Returns

  • type:

    void

addParticipant

Copy URL
addParticipant(settings: 

ParticipantSettings

):

any

Add a participant to the conversation.

Parameters

Returns

  • type:

    any

removeEventListener

Copy URL
removeEventListener(event: 

Conversation

,
callback:

Function

):

void

Remove the event handler for a specific event generated by the specified CCAI Conversation instance.

Parameters

  • Event class

  • callback:

    Function

    Optional

    Handler function. If not specified, all event listeners are removed

Returns

  • type:

    void

removeParticipant

Copy URL
removeParticipant(participant: 

Participant

):

any

Remove a participant from the conversation.

Parameters

Returns

  • type:

    any