Actions on google 在Google Actions中获取文本输入(最新版本)
如何从actions SDK(最新版本)获取用户输入。 在上一个版本中,我们只使用文本意图,如示例所示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进行处
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,您可以使用任意一个。