I'm trying to manage the context of my Google Assistant agent (in DialogFlow), using the ApiAi class in the npm package actions-on-google
.
The problem is this: How can I reset the lifespan / delete a context using the npm package?
I can easily set the lifespan of a new context, and it works.
However:
- How do I delete a context?
- Setting the context to a different number does not seem to work. That is, if I set
app.setContext('myContext',10)
and then, 2 intents later, when the lifespan in8
, I callapp.setContext('myContext',10)
again, in the next intent, the lifespan is still7
. If I could answer (1) and delete a context, I'd just delete it and set it again.