Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actions on google 在Google Actions中获取文本输入(最新版本)_Actions On Google_Google Assistant - Fatal编程技术网

Actions on google 在Google Actions中获取文本输入(最新版本)

Actions on google 在Google Actions中获取文本输入(最新版本),actions-on-google,google-assistant,Actions On Google,Google Assistant,如何从actions SDK(最新版本)获取用户输入。 在上一个版本中,我们只使用文本意图,如示例所示 app.intent('actions.intent.TEXT', async (conv, input) => { console.log('input', input) }) 我希望像在以前的版本中一样获得用户输入,但以前的版本正在弃用。 如何从action builder获取用户输入 在最新版本中,他们提供了意图、场景、类型等内容。提供了将用户全文发送到webhook进行处

如何从actions SDK(最新版本)获取用户输入。 在上一个版本中,我们只使用文本意图,如示例所示

app.intent('actions.intent.TEXT', async (conv, input) => {
   console.log('input', input)
})
我希望像在以前的版本中一样获得用户输入,但以前的版本正在弃用。 如何从action builder获取用户输入

在最新版本中,他们提供了意图、场景、类型等内容。

提供了将用户全文发送到webhook进行处理的示例

它是通过一个简单的过程来完成的

然后您的webhook可以处理intent的参数:

app.handle('doAny',(conv)=>{
const any=conv.intent.params.any.original;
conv.add(`yousaid${any}`);
});

谢谢你@Nick Felker。我想知道,如果我们想要NLP,为什么会提供我们已经拥有的意图、场景和类型。请告诉我您是否知道Actions Builder与Dialogflow正交。对于NLP,您可以使用任意一个。