首页 > 解决方案 > How to pass on multiple intents output to one single intent to execute

问题描述

Consider I want to build a system which plays audio and video

Intents I will have are

  1. Ask user what he/she wants (Audio or video)
  2. Play audio or video depending on previous intent.

I want to reuse the intent 2 (player for audio or video) without having two intents one for each audio and video.

I'm planning my intents and contexts like below

Bot: What you want to play
User: Play me audio
Bot: plays audio (using same player intent)
User: Play me video
Bot: plays video (using same player intent)

Is it possible? if so how do I do it?

标签: nlpdialogflow-es

解决方案


处理这个问题的最好方法不是通过不同的 Intent - 而是通过 Fulfillment。

意图是处理用户所说的,而不是如何回应他们所说的。Fulfillment 可让您查看已设置的参数并发送适当的响应。


推荐阅读