bespoken / bst

:wrench: Bespoken Tools - Tools for making voice apps faster and better
https://bespoken.io
Apache License 2.0
191 stars 20 forks source link

parameters in command #283

Closed NovaGL closed 7 years ago

NovaGL commented 7 years ago

How do I send a parameter for example I want to look up a TV show.

I would say alexa ask tv show "suits". how do I pass the word suits to then get the custom response

jperata commented 7 years ago

Hi, if the tv show is declared as a slot, you can surround it to specify it. You can check that in more detail here:

http://docs.bespoken.tools/en/latest/commands/speak/#working-with-slots

But for your specific example it should be:

$ bst speak ask tv show {suits}

NovaGL commented 7 years ago

Thanks will give it a go. So slots are dynamic or only predefined values as there are thousands of shows.

Might just find a current list of TV shows then dump it in. Means it needs to be annually updated

jperata commented 7 years ago

Amazon have predefined values , one of them is actually tv series, you can also add you're own list if you find it is not sufficiently updated.

NovaGL commented 7 years ago

Awesome! Will let you know how I go. Just figured out OAuth for Trakt.tv so this should be fun

NovaGL commented 7 years ago

Can I just do it with Proxy or does it need something else. I cant see the word in testing

NovaGL commented 7 years ago

EDIT: I was doing it wrong for custom intents I needed to include the slot name in the Sample Utterances

Eg. "When is {show} airing"

Figured it out it was "AMAZON.SearchAction<object@CreativeWork"

My next problem will be how to filter out the other info that gets put in the slot.

The beta builder was the answer couldn't find the answer any other way.

https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/built-in-intent-ref/videocreativework-intents

NovaGL commented 7 years ago

All working 👍

http://i.imgur.com/cotxk1C.png

jkelvie commented 7 years ago

Glad to hear it, thanks for the update @NovaGL