0
votes

We are using Watson Conversation service for ChatBot functionality. We want to configure a standard sequence of communication with users using Dialog and intents and entities. We are writing the application is java to communicate with the Conversation service via RESTful API. I understand we have to maintain the context and pass it between the application and Conversation until the conversation ends. In order to achieve this, I understand we need to store and manage the context for each user in our application. Could anyone please clarify if my understanding is correct? Also is Java a right fit for this functionality? Thanks

2
The botkit-middleware repo has an example in Node.js that manages those contexts github.com/watson-developer-cloud/botkit-middlewaredata_henrik

2 Answers

0
votes

Each conversation has its own conversation_id and its own context in the Json sent from the service. So, you don't have to store each context in your application. You could, but it is not necessary.

The usual way to use this is, when you get an answer from the Conversation Service, you store the context object, update it and send it back. In the next iteration, the service is going to send the context inside the Json again. If you use the same conversation_id, you should be able to send and receive the context, so, you don't need to store it.

0
votes

There are a number of SDK's for different languages which make this easier for you.

https://github.com/watson-developer-cloud