对话的Dialogflow电子邮件地址

对话的Dialogflow电子邮件地址

本文介绍了对话的Dialogflow电子邮件地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人对通过语音获取用户的电子邮件地址有任何建议吗?由于电子邮件地址在某种程度上遵循某种模式,因此编写起来非常简单,但是使用语音非常困难.最好只是简单地要求用户逐个读出字符吗?

解决方案

Dialogflow提供了

在您的Webhook履行中获取上述电子邮件地址:

  app.intent('getEmail',(conv,params)=> {const userMail = params.email;//记住使用与您定义的相同的变量名//您打算以参数形式访问的参数名称}); 

如果dialogflow没有自动检测到,请确保手动选择训练短语中的电子邮件地址.请参阅以获取更多帮助.

希望有帮助!

Does anyone have any suggestions for obtaining a user’s email address through speech? Written is quite straight forward as email addresses follow a pattern to some degree, but using speech is quite difficult. Is it best to simply ask the user to read out the characters one by one?

解决方案

Dialogflow provides System entites for most common user inputs.You can use sys.email entity for your purpose and then use it in your fulfillment.

Getting the above email address in your webhook fulfillment :

app.intent('getEmail', (conv, params) => {

  const userMail = params.email;
// remember to use the same variable name that you defined as
// Parameter name in your intent to access in params

 });

Just make sure to manually select the email address in training phrases if dialogflow does not automatically detect it. Refer this for more assistance.

Hope that helps!

这篇关于对话的Dialogflow电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 18:31