简体   繁体   中英

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. I'm doing this in the simple response of Google Assistant in Dialogflow. The audio is working but the he can't get the name of player 1 which is saved in a context.parameter. Does anyone know how I could get the name of player 1 in the Simple Response?

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.

OK, lets start!. 3, 2, 1 How many times did you push up #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?" But it says How many times did you push up #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. 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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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