简体   繁体   中英

How to pass conversation inputs to webhooks using API.AI

I am new at API.AI and with some tutorial, I get to know how to build a conversational bot type system where your inputs are required one by one to complete the flow like explain in this . Also, I know there is a concept of getting data from your server using webhooks, I want to learn how to use conversation in chat say in the given example pizza name and type and use these two attributes as parameters for the API.AI's webhook.

API.AI teaches us to build a chat flow model and webhooks used for getting data from the api's but I dont find any way where I could use the data shared in chat to webhooks.

It would be great if I could get some help on this

API.AI calls what you're trying to do "Fulfillment". The fulfillment section of the API.AI console lets you set the URL for the webhook, along with any static headers you may need to make sure this comes from an authentic host.

在此处输入图片说明

Once you have enabled Fulfillment, you'll need to enable that fulfillment for each Intent that you want sent to to by selecting the checkbox at the bottom of the Intent page.

在此处输入图片说明

If you don't see the "Fulfillment" section on your Intent, it usually means you haven't enabled it in the Fulfillment section above. If you see the header, but not the checkboxes, you need to expand that section by clicking on the arrow on the right.

Then you'll need to actually write your webhook. See https://api.ai/docs/fulfillment and https://developers.google.com/actions/apiai/webhook for details.

我观察到,当我将旧的意图更改为新的意图并假设旧的意图使用webhooks时,那么在新的意图中,我应该选中select webhooks复选框,并再次指定要成功调用该webhook的参数。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM