Returns the incoming context by name for this intent.
The name of the Context to retrieve.
Context value matching name or undefined if no matching context.
Set a new context for the current intent.
Name of the context. Dialogflow converts to lowercase.
Context lifespan.
Context parameters.
Generated using TypeDoc
Returns the incoming contexts for this intent as an iterator.
const AppContexts = { NUMBER: 'number', } const app = dialogflow() app.intent('Default Welcome Intent', conv => { conv.contexts.set(AppContexts.NUMBER, 1) conv.ask('Welcome to action snippets! Say a number.') }) // Create intent with 'number' context as requirement app.intent('Number Input', conv => { for (const context of conv.contexts) { // do something with the contexts } })