Is there a list of values that Alexa recognizes as a certain slot type? - alexa-skills-kit

I would like to make a simple game where Alexa picks 7 animal names at random and says them to a user. The user has to repeat the names in the reverse order.
I could use the AMAZON.Animal built-in slot type to listen for the animal names the user is saying.
But is there any way I can use this list to have Alexa randomly pick the animal names that the user has to repeat?
The documentation offers some sample values for every slot type.
Is there a more complete list for the AMAZON.Animal slot type?
I understand that the list can never be exhaustive as Amazon's must surely continuously expand it. I would just like to have a list of animal names that I can be sure of Alexa will understand.

At the moment, you can't see the full list of slot values for Amazon built-ins. Instead, I recommend creating your own animal slot type. This way you will be able to randomly choose from that set of animal names. It will function exactly like the built in and you can modify it as you see fit.

Related

How to work around firestore "array-contains-any" limitation

I am working on a Flutter project where I need to display the list of government agencies. I should implement two levels of filters. 1. State to which the agency belongs and 2. Service provided by the agency. So I have some choice chips to select the agent based on service and a checkbox-based dropdown for filtering states. As a result, I need to apply logical or based filters on state and service fields. Since that's impossible I thought of adding a helper field that holds both data in an array format. so that I could work on a single field with array-contains-any filter.
Now there is one more problem, let's say there are twelve states and 5 services, and I am selecting 6 states and 3 services. I need to create a total of 18 arrays which is also not supported by Firestore as the maximum is 10.
Please share with me an idea of any approach I could take;
Don't use arrays, simply use maps. There are no limitations regarding how many where equal methods are you chaining. The key of the Map will be the name of an agency and the value will be the boolean true. And you can add as many maps as you want.

How to store routings in job shop production in Anylogic

I have a production model were the orders (agent population) run different stations. For each order the used stations and its sequence can be different. There are 12 different combinations of these stations. One random possibility should be assigned to the order.
How can I store and assign these possibilities in my Anylogic model? Which datatype would fit the best?
What I already tried was to use the Excel Interface, but as I later want to combine different possibilities to a longer list (about 50 possibilities combined with each other) Excel seems not the best way to do it.
I’m sure this is not a super hard problem, but I couldn’t find anything about it. Thanks in advance!
Hopefully I understand your question, so here it goes. The following is the model I propose:
Here the example has 3 stations (services). You put all the enter blocks in a collection called enterBlocks and all the names of the enter blocks on a collection called enterNames... so if you use excel, you can have in your excel the enter block names and initialize your enterNames collection in the beginning of the model by reading the excel. Each agent will probably have a different collection so the collection should be inside the agent, but here I'm just simplifying.
Then you use a counter (initial value 0) and a function called getNextService that will exist in each one of the 4 exit blocks. This function will choose the next station to use:
if(counter>=enterBlocks.size())//if the agent is done with all the stations
end.take(agent); // take the agent to the exit
else{
Enter enter=findFirst(enterBlocks,e>e.getName().equals(enterNames.get(counter)));//find the enter block with the correct name
enter.take(agent); //take the agent to the correct station
counter++; //update your counter
}

alexa sdk custom logic to determine if slot is required

i have an intent with two slots: 1 custom slot called "name" and one called "number" of type AMAZON.NUMBER.
Now for some names the number is required and for others it isn't.
How can i make alexa ask for the number if one of those names is given without a number?
Can i use the CanFulFillIntentRequest for that?
If so, all the sites about it say that i have to enable it under interfaces, but i can't find it there. Has it been removed?
btw, i'm using alexa sdk v2 for node.js in my lambda function
If you CanFulFillIntentRequest for both slots the intent will hit lamdba only if 2 slots are filled.You can make CanFulFillIntentRequest for necessary one (name) and in the backend(lambda) you can check for number.If name that requires number is required give necessary response for number.
One way to do this that can be updated without having to change the code is:
Create a JSON with the names that are required to have a number and store it in S3.
Make your Lambda function to retrieve it.
Make your Lambda function check the value of the Name Slot is among those in the JSON or not.
If so, then take control of the Dialog then. I strongly suggest you to check this
If not, then just continue.
Seems a bit complex mostly because of taking control of the dialog yourself. The other option is making the number required and let Alexa do the Dialog Management the thing is what to do when the number is not required.
If you know which names are required to have a number I would use a different slot for those and make the number required and let Alexa do the dialog management, the downside of this solution is that you will need to update manually those names (or use Bulk operations).
I think any of those 2 solutions can workout.
I hope you find this useful.

Can Alexa Skills have a list and a phrase slot?

Is it possible to have an intent that has a list and an phrase (or two lists but the other is dynamically created)? Here's an example utterance I was hoping to make:
How many {foodstuff} does {someone} have?
{foodstuff} could be a list of [cookies, doughnuts, lollipops]
{someone} would be an arbitrary text or a very big list (think contents of a database column)
I realize this can be achieved using a multiple turn dialogue, but can it be done in one phrase?
Thanks!
You have to create slot for Foodstuff/someone and have to be populated with all the possible values that you can expect in those slot.

Amazon Alexa - One intent enable utterances

In Amazon Alexa is there a way to have one intent initialize a set of utterances?
I ask because I need to identify models of cars in addition to times and places. Adding slots for cars/places seems ridiculous as there would probably be 8000+ possibilities.
ex:
valetService.prototype.launch = fucntion(intent, session, response){
if(intent.slots['vehicleType'] === 'car'){
response.ask('Which vehicle?', *activate utterance*);
}
};
If this isnt possible, could I create a series of functions that handle each piece of information necessary and then change the target function for a single-word-intent each time?
You don't need to do what your question is aimed at. What you're trying to avoid --not defining a Custom Slot Type-- is actually the answer to your problem.
You can use a Custom Slot Type for what you want. I agree that it would be ridiculous to list all the possible options, but that's the catch: you don't have to!
All you have to do is to define a Custom Slot Type, perhaps add a few values, because I'm not sure you can get away without and you're done. Alexa WILL SEND the value for the slot to your skill, even if it is not in the list. In Amazon words:
Note that a custom slot type is not the equivalent of an enumeration. Values outside the list may still be returned if recognized by the spoken language understanding system. Although input to a custom slot type is weighted towards the values in the list, it is not constrained to just the items on the list. Your code still needs to include validation and error checking when using slot values. See the “Handling Possible Input Errors” section of Handling Requests Sent by Alexa.
You can find all about it here.

Resources