Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contextsRequest create API issues #120

Open
sbcalculas opened this issue May 25, 2020 · 0 comments
Open

contextsRequest create API issues #120

sbcalculas opened this issue May 25, 2020 · 0 comments

Comments

@sbcalculas
Copy link


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant