0

Is there a way to have a "Repeat" follow-up intent for existing intents? This "repeat" intent will repeat the previous response except for default fallback.

It's tedious and difficult to maintain if there's a repeat intent for all intent. I've given a thought of adding an event for all the intents, and i think it's also tedious to do this. Also, events will only work if there's a webhook.

Prisoner
  • 49,922
  • 7
  • 53
  • 105
Wreeecks
  • 2,186
  • 1
  • 33
  • 53
  • 1
    Does this answer your question? [Dialogflow - Repeat last sentence (voice) for Social Robot Elderly](https://stackoverflow.com/questions/59861715/dialogflow-repeat-last-sentence-voice-for-social-robot-elderly) – Jordi Feb 03 '20 at 10:28
  • @Jordi yes, it's the same issue. I also end up storing the last response in the context excluding default fallback responses. – Wreeecks Feb 03 '20 at 23:19

1 Answers1

0

You should not use a Followup Intent for handling "repeat'. This is the perfect example of a top-level Intent that is available from any level in the conversation.

You should be storing the information you need to repeat what you just said in parameters in a Context. When the repeat Intent is triggered, use this information to create the response.

The VoiceRepeater library is a drop-in for the actions-on-google v1 library, but illustrates one approach to doing this.

The multivocal library makes this even more transparent and does this for you by default, but is a different approach in other ways from the actions-on-google library.

Prisoner
  • 49,922
  • 7
  • 53
  • 105
  • Thanks for your response. It turns out that we came up with the same solution. I stored the fulfilmentText in the context and when the intent is triggered it will look for the last response in the context. Similar on how multivocal works. – Wreeecks Feb 03 '20 at 23:13
  • It is a broadly acceptable solution to the problem, and I'm glad it'll work for you. If these answers have helped, upvoting them is always appreciated. – Prisoner Feb 04 '20 at 00:22