2
votes

I have created a chatbot on Api.ai and integrated with facebook messenger. If the response time is less than 4 sec I am getting the response but there is no response after 4-5 sec.

This is the json I am getting from my webhook, but it does not display any data in messenger.

{ “speech”: “Welcome”, “displayText”: “Welcome”, “data”: { “facebook”: [ { “text”: “Interesting! Here are the items” } ] } }

Below is the screensho tof the example 200 Response code for the request-

https://imgur.com/a/I7bGa

Help me to get rid of this problem.

Thanks

1
Your question is not clear enough, what's the stack you're using, are you using third party api's in your webhook? are you running extremely intensive queries on a database? what do you think might be causing this? API.ai has a limit where a webhook needs to respond within 5 seconds or it will discard anything you send back from the webhook.Anomaly

1 Answers

0
votes

Dialogflow (formerly API.AI) has a 5 second timeout for webhook responses as documented here: https://dialogflow.com/docs/fulfillment#limits

This limit is intended to enforce a good user experience for conversational platforms.