1
votes

I am working on a chatbot with Watson assistant. I would like to add the code here but my question is conceptual.

Let say a person is chating with my bot. Upon a certain request I want to call the same chat session and set a variable in there ( context variable as said in IBM watson assistant )

Is this possible ? Has anyone one ever done such a thing ?

Python Ibm watson assistant python SDK Ibm cloud functions

2
Your question is not clear. What do you mean by chat session? If you use the SDK / API, you can pass in data to be used as context variables and have the dialog react to it. Yes, that is done all the times.data_henrik

2 Answers

1
votes

There is 2 answer here.

First, if you want to keep going on in your chat session previously opened and still active, you can use the chat session ID to go on where you left it.

Second, if you want your bot to remind some data about the user, the sessions are not saved. You need to save data you want to keep in a database. This can be done through Webhooks or through your orchestrator. Then when you start your session, you get all your data from the database for this user and include them in the context. Then your chatbot will react to this context. Of course you need to include this behavior in your skill.

0
votes

There is a "system" context variable which is used by Watson Assistant to keep track of the chat flow(dialog node) where the user is in at that point in time. You can try using the "system" context of the dialog node where you want the user to jump and go back to that previous chat.