Conversation

Represents a CCAI conversation instance.
View as Markdown

Constructor

1new Conversation(settings: CCAI.ConversationSettings)

Parameters

settings
CCAI.ConversationSettingsRequired
1new Conversation(settings: CCAI.ConversationSettings)

Parameters

settings
CCAI.ConversationSettingsRequired

Methods

addEventListener

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

1addEventListener(event: CCAI.Events.Conversation | T, callback: (event: CCAI.Events._ConversationEvents[T]) => any): void

Parameters

event
CCAI.Events.Conversation | TRequired
callback
(event: CCAI.Events._ConversationEvents[T]) => anyRequired

addParticipant

Adds a participant to the conversation.

1addParticipant(settings: CCAI.ParticipantSettings): CCAI.Participant

Parameters

settings
CCAI.ParticipantSettingsRequired

removeEventListener

Removes a handler for the specified CCAI.Events.Conversation event.

1removeEventListener(event: CCAI.Events.Conversation | T, callback?: (event: CCAI.Events._ConversationEvents[T]) => any): void

Parameters

event
CCAI.Events.Conversation | TRequired
callback
(event: CCAI.Events._ConversationEvents[T]) => any

removeParticipant

Removes a participant from the conversation.

1removeParticipant(participant: CCAI.Participant): void

Parameters

participant
CCAI.ParticipantRequired