I have the following settings for an Alexa skill that I'm writing:
Intent Schema
{
"intents": [
{
"intent": "AddToGroceriesIntent",
"slots": [
{
"name": "GroceriesItems",
"type": "GROCERIES_ITEMS"
}
]
},
{
"intent": "GetGroceriesIntent"
},
{
"intent": "ClearGroceriesIntent"
},
{
"intent": "AMAZON.HelpIntent"
},
{
"intent": "AMAZON.StopIntent"
},
{
"intent": "AMAZON.CancelIntent"
}
]
}
Sample Utterances
AddToGroceriesIntent to add {GroceriesItems}
AddToGroceriesIntent to add {GroceriesItems} to shopping list
AddToGroceriesIntent to add {GroceriesItems} to the shopping list
AddToGroceriesIntent to add {GroceriesItems} to the list
GetGroceriesIntent list
GetGroceriesIntent shopping list
GetGroceriesIntent for the shopping list
GetGroceriesIntent for the list
GetGroceriesIntent what's on my shopping list
GetGroceriesIntent what's on the shopping list
GetGroceriesIntent what's on the list
GetGroceriesIntent what's on my list
GetGroceriesIntent what is on my shopping list
GetGroceriesIntent what is on the shopping list
GetGroceriesIntent what is on the list
GetGroceriesIntent what is on my list
ClearGroceriesIntent to clear my shopping list
ClearGroceriesIntent to clear my list
ClearGroceriesIntent to clear the shopping list
ClearGroceriesIntent to clear the list
ClearGroceriesIntent to empty my shopping list
ClearGroceriesIntent to empty my list
ClearGroceriesIntent to empty the shopping list
ClearGroceriesIntent to empty the list
ClearGroceriesIntent to delete my shopping list
ClearGroceriesIntent to delete my list
ClearGroceriesIntent to delete the shopping list
ClearGroceriesIntent to delete the list
When Alexa hears:
alexa ask my app to clear my shopping list
As expected, the correct ClearGroceriesIntent is sent. However, when Alexa hears:
alexa ask my app to clear the shopping list
The GetGroceriesIntent is sent instead.
This issue can't be replicated by the Service Simulator - it works fine then. It's only during speech that it gets muddled up, even though (according to the history) Alexa heard the exact same thing as what I type into the test form.
(All of the AddToGroceriesIntent and GetGroceriesIntent utterances work as expected)
One suggestion that might help is to change your sample utterances to remove the connecting words - in your case 'to' and 'for' shouldn't be in the sample utterances, reference these docs under 'Invoking a Skill with a Specific Request (Intent)'. I'm not sure if that will fix the problem but good to do anyway. If the problem persists, you may have a situation that maps to this discussion about how the NLP always returns one of your intents - even if it doesn't understand, it just picks one. Maybe it is routinely picking GetGroceriesIntent when it doesn't understand.
Related
Hello I have a class of Fish and within this class I create a list of items. Now I'm trying to create a database using Sqflite where if the user tap on an item, the selected item will be added to the database. And finally I want to display the selected items to the user. Please Can you guys save me???
code sample:
class Fish {
List listOfFish = [
"A l'amiral",
"Ackee and saltfish",
"Acqua pazza",
"Agujjim",
"Amplang",
"Arsik",
"Asam pedas",
"Aseed",
// B
"Bacalaito",
"Bacalhau a Bras",
"Bacalhau a Gomes de Sa",
];
}
Tried adding contact for Mobile Push channel in Marketing cloud through REST API(create_contact) and it is working but not able to add contacts within the specific contact list.
I created a contact list from the dashboard(MobilePush -> AddContact -> Lists -> CreateList -> FilteredList -> CreateFromFile -> Save as standard list).
After creating a list I found "EXTERNAL KEY" and "LIST ID" from the list properties.
Now I would like to create contacts within the list via create_contact REST API.
My goal is to find songs that match user's choices. User has the opportunity to exclude genres he doesn't like.
This is basically a duplicate of this question, except that I'd like to be able to do this in an Aggregate operation instead of a Find, as I need to add other stages.
Right now, I am trying in an aggregation to exclude songs that belong to genres user doesn't like.
My song json is as such (keep in mind this is dummy data - but this song is really good though):
{
"_id": {
"$oid": "5890aa3b0a9f110011698fac"
},
"artist": "Beach House",
"songName": "Master Of None",
"genres": [
{
"$oid": "58624b4298fba881a46663a01"
},
{
"$oid": "58624b9d98fba772a46663a05"
}
]
}
A song can have multiple genres, stored in an array of objects as references to Genre documents in a different collection.
Basically, user's disliked genres are in an array of genre $oid.
Say
dislikedGenres = [ "786761gg1G176ga1", "78676187g1G176hsj3", "78676187g1G1761sj4" ]
What I'm trying to do is say "if you find a song with any of these genres, exclude it".
Any idea how to achieve this? I feel like I'm missing something dramatically obvious here...
Thanks in advance for the help! Much appreciated.
Please leave a comment if you need extra info.
I posted a question abt the api returning invalid history ids. I'm trying to figure this out. I think the ids are just not valid in a messages get request, since these are not real messages, rather drafts. I don't know why history list is returning drafts for a messagesAdded request. Can somebody tell me if this is the expected behavior?
{
"history": [
{
"id": "10946109",
"messages": [
{
"id": "15cc8cd840c2945a",
"threadId": "15cc5ccf65733c7f"
}
],
"messagesAdded": [
{
"message": {
...
"labelIds": [
"SENT"
]
}
}
]
},
{
"id": "10975146",
"messages": [
{
...
}
],
"messagesAdded": [
{
"message": {
...
"labelIds": [
"DRAFT"
]
}
}
]
}
If I need to filter for actual messages - not drafts, do I just do labelIds does not contain DRAFT?
Your first question:
Can somebody tell me if this is the expected behavior?
Yes this is expected behavior (replicated). Check this Document regarding History List:
Users.history: list
Lists the history of all changes to the given mailbox. History results
are returned in chronological order (increasing historyId).
Your second question:
If I need to filter for actual messages - not drafts, do I just do labelIds does not contain DRAFT?
Yes there is an actual filter. You can change the "labelId" parameter to anything except "DRAFT" so it would not return draft results in the history.
Below is a simple guide on how to properly filter your messages without returning Draft label types:
To check your list of labelId's, try this Label API Test Link to see your list of labels just to be sure that you will be using a valid "labelId" later in step 3 by executing the API.
Get the value of the "historyId" by executing the Message List API, retrieving a list of message then get one id then use the Message Get API
by entering the ID to retrieve the "historyId". Make sure that the labelId is not a "DRAFT" type or you have to get another id from the list just to avoid returning a "DRAFT" type.
Then execute History API Test Link. Enter your "userId" and the "startHistoryId"(make sure to subtract the value of the "startHistoryId" by 1) of your message and change the "labelId" by using one from the list of labels you retrieved from your GET API in step 2, change the "historyTypes" to "messagesAdded" then click execute.
It should return a list of message under the "labelId" being inputted and not a "DRAFT" type.
The playground has an example card that includes a "creator" field with the name and an image representing "Google Glass". The JSON used to create this card is
{
"text": "Hello Explorers,\n\nWelcome to Glass!\n\n+Project Glass\n",
"creator": {
"displayName": "Project Glass",
"imageUrls": [
"https://lh3.googleusercontent.com/-quy9Ox8dQJI/T3xUHhub6PI/AAAAAAAAHAQ/YvjqA3Pw1sM/glass_photos.jpg?sz=360"
]
},
"notification": {
"level": "DEFAULT"
}
}
When this is sent to Glass, however, the imageUrl isn't displayed. The documentation at https://developers.google.com/glass/v1/reference/timeline/insert simply says that "creator" is a "nested object", but with no clear indication what this nested object should be. The example seems to indicate that this should be a Contact (see https://developers.google.com/glass/v1/reference/contacts), and the object returned by the insert seems to be of type "mirror#contact", confirming this.
Does the contact used in a creator need to be pre-created via the contacts API call first? Is there something else necessary to get the creator to display or work correctly?
The creator is currently displayed only if the REPLY menu item is provided along with the timeline item.
This seems like a bug, please file it on our issue tracker