Rate this page:

Agent

Represents a CCAI Agent instance.

Constructors

constructor

Copy URL

Parameters

  • agentId:

    string

  • region:

    string

    Optional

Methods

addEventListener

Copy URL
addEventListener(event: 

Agent

,
callback:

Function

):

void

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

Parameters

  • event:

    Agent

    Event class (i.e., CCAI.Events.Agent.Started)

  • callback:

    Function

    Handler function. A single parameter is passed - object with event information

Returns

  • type:

    void

destroy

Copy URL
destroy(): 

void

Destroys a CCAI Agent instance.

Returns

  • type:

    void

getConversationProfile

Copy URL
getConversationProfile(request: 

Object

):

Promise<GetConversationProfileResult>

Gets the Dialogflow conversation profile.

Parameters

  • request:

    Object

    Dialogflow get conversation profile request data

Returns

getProfilesList

Copy URL
getProfilesList(): 

Promise<GetProfilesListResult>

Gets the list of a Dialogflow conversation profiles.

Returns

removeEventListener

Copy URL
removeEventListener(event: 

Agent

,
callback:

Function

):

void

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

Parameters

  • event:

    Agent

    Event class (i.e., CCAI.Events.Agent.Started)

  • callback:

    Function

    Optional

    Optional. Handler function. If not specified, all handler functions are removed

Returns

  • type:

    void

updateConversationProfile

Copy URL
updateConversationProfile(request: 

Object

):

Promise<UpdateConversationProfileResult>

Updates the Dialogflow conversation profile.

Parameters

  • request:

    Object

    Dialogflow update conversation profile request data

Returns