简体   繁体   English

我可以在Google智能助理简单响应中使用参数吗?

[英]Can I use parameters in a Google Assistant Simple Response?

I'm making an agent which plays some audio and asks after that what player 1 pushed up in the time the audio played. 我正在制作一个播放一些音频的代理,然后询问播放器1在音频播放时向上推的是什么。 I'm doing this in the simple response of Google Assistant in Dialogflow. 我在Dialogflow的Google智能助理的简单回复中这样做了。 The audio is working but the he can't get the name of player 1 which is saved in a context.parameter. 音频正在运行,但他无法获得保存在context.parameter中的播放器1的名称。 Does anyone know how I could get the name of player 1 in the Simple Response? 有谁知道如何在简单响应中获得播放器1的名称?

I've tried the way you can get the parameter in the 'normal' response which is #p1name_confirmed.p1name (p1name_confirmed is the context and p1name is the parameter. 我已经尝试过在'正常'响应中获取参数的方式,即#p1name_confirmed.p1name(p1name_confirmed是上下文,p1name是参数。

OK, lets start!. 好的,让我们开始! 3, 2, 1 How many times did you push up #p1name_confirmed.p1name ? 3,2,1你推了多少次#p1name_confirmed.p1name?

I expect that he should say ">OK, lets start!. 3, 2, 1" than play the audio and then say "How many times did you push up Alex?" 我希望他应该说“>好吧,让我们开始!3,2,1”,而不是播放音频,然后说“你有多少次推高Alex?” But it says How many times did you push up #p1name_confirmed.p1name ? 但它说多少次你推高了#p1name_confirmed.p1name?

Yes, you can use context in intents to get parameters of other intent and it seems you are doing it right. 是的,你可以使用意图中的上下文来获取其他意图的参数,看起来你做得对。

It is possible your context p1name_confirmed lifespan is not enough or input context can't match output context. 您的上下文p1name_confirmed生命周期可能不够,或者输入上下文无法匹配输出上下文。 Make sure your context lifespan is long enough and you added output context to intent of desired parameter(input context to intent you make call as well). 确保您的上下文生命周期足够长并且您将输出上下文添加到所需参数的意图(输入上下文以意图您进行调用)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM