watson-developer-cloud / botkit-middleware

A middleware to connect Watson Conversation Service to different chat channels using Botkit
https://www.npmjs.com/package/botkit-middleware-watson
Apache License 2.0
206 stars 255 forks source link

Resetting the context variables and output #159

Closed developer-bz closed 5 years ago

developer-bz commented 5 years ago

Hi,

I am unable to reset the context variables and the output returned in the previous query due to which the results conflict. How can i reset them? message.watsonData.context = ''; does not seem to work

Thanks in advance

germanattanasio commented 5 years ago

Please provide a set of reproducible steps. You can also look into the examples in the README https://github.com/watson-developer-cloud/botkit-middleware#using-sendtowatson-to-update-context-possible-since-v150

developer-bz commented 5 years ago

I am using the same example. I am trying to come out of the child node when the input is invalid and go to exit intent. The intent is detected properly, but the response is not getting updated, resulting in the same child node response.

Naktibalda commented 5 years ago

Checking input first would be simpler, than trying to override response later.

developer-bz commented 5 years ago

Ok, thank you