Coder Social home page Coder Social logo

Comments (4)

vCarly avatar vCarly commented on July 19, 2024

That doesn't look like the right line number for me... what is the text of the line you put that after to make it work? Did you discover anything else using this example?

from skill-sample-nodejs-fact.

franklin-lobb avatar franklin-lobb commented on July 19, 2024

The skill is designed to tell a fact and then exit, so the behavior @shvedPetro describes is expected.

The .reprompt(repromptOutput) would be added to the GetNewFactHandler, in this part of the code:

    return handlerInput.responseBuilder
      .speak(speakOutput)
      .withSimpleCard(requestAttributes.t('SKILL_NAME'), randomFact)
      .getResponse();

modifying it to listen for a response (and reusing the speak output value in this example, however whenever you are reprompting, the output should end with a question which the fact does not)

    return handlerInput.responseBuilder
      .speak(speakOutput)
      .reprompt(speakOutput)
      .withSimpleCard(requestAttributes.t('SKILL_NAME'), randomFact)
      .getResponse();

from skill-sample-nodejs-fact.

chfw avatar chfw commented on July 19, 2024

Alexa and I were confused about invocation name and intent's slots. If speaking out invocation name to Alexa would trigger a piece of space facts, why bother intent's slots? i.e.

- Alexa, open space facts.
- Here is a piece of fact, the sun....
- tell me a fact
..(silent)..

I am also confused, if there are alternatives to trigger the skill?

from skill-sample-nodejs-fact.

franklin-lobb avatar franklin-lobb commented on July 19, 2024

Space facts is a simple skill which only does one thing - tell you a fact. As a result, invoking the skill essentially does the same thing as invoking the skill and asking for a fact in a single utterance. However, since the session is not kept open (in the way the code is currently setup), it is not possible to access the other functionality (like help), without combining it into a single utterance along with invoking the skill. Since there are other intents, the Get Fact intent must also exist.

There are also multiple words and phrasing you can use to invoke a skill. Check this out: https://developer.amazon.com/docs/custom-skills/understanding-how-users-invoke-custom-skills.html

from skill-sample-nodejs-fact.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.