Agent

Represents a CCAI Agent instance.
View as Markdown

Constructor

1new Agent(agentId: string, region?: string)

Parameters

agentId
stringRequired
region
string
1new Agent(agentId: string, region?: string)

Parameters

agentId
stringRequired
region
string

Methods

addEventListener

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.

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

Parameters

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

destroy

Destroys a CCAI Agent instance.

1destroy(): void

getConversationProfile

Gets the Dialogflow conversation profile.

1getConversationProfile(request: Object): Promise<GetConversationProfileResult>

Parameters

request
ObjectRequired

getProfilesList

Gets the list of a Dialogflow conversation profiles.

1getProfilesList(): Promise<GetProfilesListResult>

id

Returns the CCAI Agent id.

1id(): string

removeEventListener

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

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

Parameters

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

updateConversationProfile

Updates the Dialogflow conversation profile.

1updateConversationProfile(request: Object): Promise<UpdateConversationProfileResult>

Parameters

request
ObjectRequired