问题描述
您好,我正在创建一个填补空缺的聊天机器人,在开始时我想问尽可能多的开放性问题,以使我的流程与正常对话最相似。
Hi I am creating slot filling chatbot where I would like to ask as much open question as possible at the beginning to make my flow the most similar to the normal conversation.
如何实现两种类型的提示,一种是通用的,用于指定缺少哪个参数以及用户是否会不会以正确的方式填写它,那么我想通过使用建议筹码向他建议答案? (上面的流程图中的蓝色)
How can I achieve two types of prompts one general to specify which parameter is missing and if user will not fill it in a correct way then i would like to suggest him answers by using suggestion chips? (Blue on the flow diagram above)
推荐答案
AFAIK,您的要求只能在webhook代码中实现; Dialogflow配置不足以设置这种对话框。 Webhook是必需的-但是,某些资源完全不建议使用。去阅读。
AFAIK, your requirements can only be implemented in webhook code; the Dialogflow configuration is not enough to set up this kind of dialog. A webhook is necessary - however, some resources discourage that altogether. Go and read The different types of Dialogflow (API.AI) slot filling tasks carefully.
如果您决定开始使用webhook进行插槽填充(此是一个很好的起点),它将:
If you decide to start using webhook for slot-filling (this sample webhook implementation is a good starting point), it will:
+----------+ +-------------+ +-------------+
| | ------> | | -----> | |
| User | | Dialogflow | | Webhook |
| | <------ | | <----- | |
+----------+ +-------------+ +-------------+
- 接收到具有公认意图和实体的请求
- 询问后续问题(询问缺少的实体或提供是否提供不受支持的价值的建议)
这意味着Dialogflow现在仅用于自然语言理解(NLU),并且Webhook负责对话框管理。
Basically, this means that Dialogflow is now used only for natural language understanding (NLU) and the webhook becomes responsible for dialog management.
这篇关于插槽填充聊天机器人,提示中的建议筹码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!