You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
global.NLP = require('apiai')(APIAI_TOKEN);
let dialogFlowToken = "1234567890"
let context = [
{
"name": "Sample_Context",
"parameters": {
"location": "Bedroom"
},
"lifespan": 5
}
];
const apiaiReq = global.NLP.contextsRequest(context, { sessionId: dialogFlowToken });
apiaiReq.on('response', async (response) => {
console.log(response);
});
apiaiReq.on('error', (error) => {
console.log(error);
});
apiaiReq.end();
}
The response is {"status":{"code":200,"errorType":"success"}}
But in the next request there is no context i am getting back.