Search code examples
node.jswatson-conversation

Access the context variables stored in watson conversation using node.js


I want to access the context variables saved in watson conversation JSON through an APP using node.js.

I have tried saving the whole conversation log into cloudant and fetched it from there.

Is there a easier way to access the context variables? I am thinking of sending a http request to server to fetch the right variables (I dont know which variables to access).


Solution

  • Depending on your needs you can store context in the browser session. This is what the conversation-simple app does.. https://github.com/watson-developer-cloud/conversation-simple In this case the JSON context object is passed down to the browser, and passed back up again with subsequent requests. The alternative is to store this info in a custom store such as Cloudant