Rahul Kalidindi
Rahul Kalidindi

Reputation: 4736

Increase timeout from Webhook response in API.ai

I am trying to make multiple API calls to get the response from the webhook. So, the API calls are taking more than 5 secs for getting the response.

I have gone through the document for API.ai and found that set timeout is 5secs for intent request. Is there a way we can increase the timeout for the webhook response for API.ai?

Upvotes: 6

Views: 3830

Answers (2)

Inzamam Malik
Inzamam Malik

Reputation: 3445

Someone suggested this on forum:

Jan '17 what you would probably want is something that starts handling the request async and an intent that can be invoked to check the status of the request. so basically 2 intents/actions.

startprocess intent - webhook returns response “ill start on that”, handles intent/action async, when finished stores results in db with sessionId.

statusprocess intent - webhook checks status by pulling results from db with sessionId, if data is found return results if not then return “still working on it”

Upvotes: 0

Leon Nicholls
Leon Nicholls

Reputation: 4656

The timeout is not configurable. The nature of the interaction with the user is conversational and therefore the user expects a response in a timeous manner. Long delays will confuse users and make them think your app is unresponsive.

If your operation takes longer than the timeout, consider changing the design of your conversation, either to have the user come back later or to gather other information from the user while the operation is completing.

Upvotes: 6

Related Questions