Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Context<TParameters>

Type parameters

Hierarchy

Properties

Properties

lifespan

lifespan: number

Remaining number of intents

name

name: string

Full name of the context.

parameters

parameters: TParameters

The context parameters from the current intent. Context parameters include parameters collected in previous intents during the lifespan of the given context.

See here.

example

app.intent('Tell Greeting', conv => {
  const context1 = conv.contexts.get('context1')
  const parameters = context1.parameters
  const color = parameters.color
  const num = parameters.num
})

// Using destructuring
app.intent('Tell Greeting', conv => {
  const context1 = conv.contexts.get('context1')
  const { color, num } = context1.parameters
})

Generated using TypeDoc