question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Support Static Reprompts

See original GitHub issue

My Proposal: Introduce a new NoInputPrompt class and can specify prompts using the class for when no input

Until the sdk version 1, we could specify prompts for when a user has no input in a fulfillment code. For example, it was like the following:

// We could specify phrases for reprompts to the 2nd argument.
app.ask("What is your favorite color?", [
  "Are you still there?", "Hello?", "Sorry, talk to you later. Bye!"
]);

However, since the sdk version 2, there is no such interface. I remember that the feature was called “Static Reprompts”. But, the information of the static reprompts was deleted from the document. Currently, we need to use either System-default reprompts or Dynamic reprompts. That is, we can’t specify the phrase of the reprompts in our fulfillment code, and we need to prepare an intent to handle the event called actions_intent_NO_INPUT to handle the situation of no input.

We have already been discussing about this theme at #155. I was misunderstanding that the static reprompts has already been deprecated, because all information about the static reprompts was deleted from the document above. But, at least in the protocol, it seems that the noInputPrompts spec is still alive (see the spec).

We need to confirm whether the static reprompts feature is still alive or not. But, I guess that the spec is still alive. If true, we need to support the static reprompts feature again in the sdk version 2, too.

I would like to propose a new idea to support the static reprompts feature in the sdk version 2.

Introduce a new class NoInputPrompts

To represent phrases for when no input, I would like to introduce a new class called NoInputPrompts. This class has an ability to hold and provide some phrases. When we create an instance with the class, we can pass both the SimpleResponse instances and plain strings as like the following:

const noInputPrompts = new NoInputPrompts(
  new SimpleResponse({ textToSpeech: "Are you still there?", ... }),
  "Hello?",  // same as `new SimpleResponse("Hello?")`
  "Sorry, talk to you later. Bye!"
);

Apply the NoInputPrompts with the conv.ask and conv.close

If we want to specify phrases for when no input, we can pass the NoInputPrompts instance to the conv.ask and conv.close. For example, we can write the code to use the static reprompts feature as like the following:

app.intent("Default Welcome Intent", conv => {
  const noInputPrompts = new NoInputPrompts(
    "Are you still there?", "Hello?", "Sorry, talk to you later. Bye!"
  );
  conv.ask("What is your favorite color?", noInputPrompts);
});

Then, if using Actions SDK, the response will become like the following:

{
  ...
  "expectedInputs": [
    {
      "inputPrompt": {
        "richInitialPrompt": {
          "items": {
            "simpleResponse": {
              "textToSpeech": "What is your favorite color?",
              ...
        "noInputPrompts": [
          {
            "textToSpeech": "Are you still there?",
            ...
          },
          ...
        ],
        ...

If using Dialogflow:

{
  "payload": {
    "google": {
      "richResponse": {
        "items": [
          {
            "simpleResponse": {
              "textToSpeech": "What is your favorite color?",
              ...
      "noInputPrompts": [
        {
          "textToSpeech": "Are you still there?",
          ...
        },
        ...
      ],
      ...

Of course, this proposal is unnecessary, if the static reprompts feature is deprecated. But, if the feature is still alive, I would like to add the idea above to the sdk v2.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
Canaincommented, Aug 3, 2018

The feature should be live now for actions-on-google@2.3.0

1reaction
Canaincommented, Jul 27, 2018

We can aim to get a release out next week.

Ideally we were looking to bundle some features up together for a MINOR release but there hasn’t been much new features for the library so a release hasn’t been made. But we can do one since it’s been a while.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SOLUTION: Static Website Proposal - Studypool
A static website consists of HTML files and CSS files linked together to aid in the display of information it intends to communicate....
Read more >
Proposal Support - Tips Construction
Proposal Support · Proposal submitted to agency that lists scope of work or specification and TIPS Contract Number. · Takeoff or estimate of...
Read more >
Tutorial: Configuring a static website on Amazon S3
You can configure an Amazon S3 bucket to function like a website. This example walks you through the steps of hosting a website...
Read more >
Two Successful Approaches to Account Planning [Template]
First, you should develop criteria for determining which accounts need an account plan. Clients who tend to require an account plan include ...
Read more >
bolt12.org: Lightning's Native Experience, Everywhere
You scan a QR code, your wallet prompts you to pay it, just like BOLT11 invoices today (the QR code labelled BOLT11 Invoice)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found