在用户被定向到网页后,是否有一种方法可以将用户重定向到 google 助手操作中的同一会话
Is there a way of redirecting user to same session in google assistant action after he is directed to a webpage
我已经使用 dialogflow.I 为 google 助手构建了一个操作,但在用户点击 conversation.Once 期间向用户提供 weblink 的情况下卡住了link 他将被定向到要上传的网页 image.After 他上传了一张图片我想将他重定向到 google 中的同一会话 action.Is 我可以通过某种方式重定向用户回到相同的操作会话。
您不需要 return 到同一会话,这是不可能的。
只要用户经过验证(系统可以识别他们或他们的声音)并且没有禁用数据存储,您就可以在 conv.user.storage
对象中 store data across sessions。如果您使用的是 node.js,它可能看起来像这样:
app.intent('Save Sum', (conv) => {
if (conv.user.verification === 'VERIFIED') {
conv.user.storage.sum = conv.data.sum;
conv.close(`Alright, I'll store that for next time. See you then.`);
} else {
conv.close(`I can't save that right now, but we can add ` +
`new numbers next time!`);
}
});
最好使用帐户 linking https://developers.google.com/assistant/identity 的 google 操作来检索整个对话中的用户信息,即使他正在打开link 然后作为回访用户回来可以让对方继续您的对话流程。
谢谢
我已经使用 dialogflow.I 为 google 助手构建了一个操作,但在用户点击 conversation.Once 期间向用户提供 weblink 的情况下卡住了link 他将被定向到要上传的网页 image.After 他上传了一张图片我想将他重定向到 google 中的同一会话 action.Is 我可以通过某种方式重定向用户回到相同的操作会话。
您不需要 return 到同一会话,这是不可能的。
只要用户经过验证(系统可以识别他们或他们的声音)并且没有禁用数据存储,您就可以在 conv.user.storage
对象中 store data across sessions。如果您使用的是 node.js,它可能看起来像这样:
app.intent('Save Sum', (conv) => {
if (conv.user.verification === 'VERIFIED') {
conv.user.storage.sum = conv.data.sum;
conv.close(`Alright, I'll store that for next time. See you then.`);
} else {
conv.close(`I can't save that right now, but we can add ` +
`new numbers next time!`);
}
});
最好使用帐户 linking https://developers.google.com/assistant/identity 的 google 操作来检索整个对话中的用户信息,即使他正在打开link 然后作为回访用户回来可以让对方继续您的对话流程。
谢谢