Open HARSHITAGUPTA123 opened 5 years ago
Found the error. You may need to update your API here
String _getUrl(query) {
return "https://api.dialogflow.com/v1/query?v=$version&contexts=$query"
"&lang=es&query=$query&lang=$language&sessionId=$sessionId&timezone=$timezone";
}
So this is using v1, the support of which is soon going to end. Secondly, you are passing contexts same as query(entered by user) which will break when the entered query has spaces or question marks or any special characters, as contexts do not allow all of that.
My code is giving error at
AIResponse response = await dialogflow.sendQuery(query);
. I am using webhook through my own server for response. But the error comes before hitting webhook and says thatWhen I am checking my request json, it shows contexts key in json as
We can never set contexts on Dialogflow console to anything with spaces or special characters. It doesn't allow us to do that. And to clear,
fashion exhibition
is one of the smart reply and I am not at all setting context to this. This is automatically happening in each request. It only works when smart reply doesn't contain any spaces. Please help, my app is broken and this happened only 3 weeks ago. It was working fine before that