Class: ConversationContext

ConversationContext(settings)

Abstract class for a conversation context of a chatbot. The conversation context is the responsible of storing and retrieving the context scope variables based on the current conversation. The getConversationContext receive the session of the chatbot, and must return a promise with the context in the resolve.

Constructor

new ConversationContext(settings)

Constructor of the class.
Parameters:
Name Type Description
settings Object Settings for the instance.
Source:

Methods

getConversationContext()

Given a session, return a promise to resolve the conversation context.
Source:

getConversationId(session) → {String}

Given a session instance of a chatbot, return the conversation identifier.
Parameters:
Name Type Description
session Object Session instance of a message of chatbot.
Source:
Returns:
Identifier of the conversation.
Type
String

setConversationContext()

Given a session, return a promise to set the conversation context.
Source: