Skip to navigation

Agent

Represents a CCAI Agent instance.
View as Markdown

Constructor

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

Parameters

agentId
stringRequired
region
string
new 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.

addEventListener(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.

destroy(): void

getConversationProfile

Gets the Dialogflow conversation profile.

getConversationProfile(request: Object): Promise<GetConversationProfileResult>

Parameters

request
ObjectRequired

getProfilesList

Gets the list of a Dialogflow conversation profiles.

getProfilesList(): Promise<GetProfilesListResult>

id

Returns the CCAI Agent id.

id(): string

removeEventListener

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

removeEventListener(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.

updateConversationProfile(request: Object): Promise<UpdateConversationProfileResult>

Parameters

request
ObjectRequired