Closed probststefan closed 4 years ago
Hey!
the value is mapped from the "said value". I get Champagner
in key
.
What's your jovo-platform-alexa
version? jovo -v
Im running on jovo-platform-alexa: 2.2.17
Hm, any idea how I could reproduce it?
I tested it with the same version.
Could you publish the code you used to try it out?
Alexa Language model:
{
"interactionModel": {
"languageModel": {
"invocationName": "meine trink app",
"intents": [
{
"name": "DrinkSelectionIntent",
"slots": [
{
"name": "drink",
"type": "LIST_OF_DRINKS"
}
],
"samples": [
"{drink}",
"{drink} bitte",
"ich würde gerne {drink} trinken",
"wir trinken {drink}",
"ich trinke {drink}"
]
},
{
"name": "AMAZON.NavigateHomeIntent",
"samples": []
}
],
"types": [
{
"name": "LIST_OF_DRINKS",
"values": [
{
"name": {
"value": "Champagner",
"synonyms": [
"Sekt"
]
}
}
]
}
]
}
}
}
app.js
'use strict';
// ------------------------------------------------------------------
// APP INITIALIZATION
// ------------------------------------------------------------------
const { App } = require('jovo-framework');
const { Alexa } = require('jovo-platform-alexa');
const { GoogleAssistant } = require('jovo-platform-googleassistant');
const { JovoDebugger } = require('jovo-plugin-debugger');
const { FileDb } = require('jovo-db-filedb');
const app = new App();
app.use(
new Alexa(),
new GoogleAssistant(),
new JovoDebugger(),
new FileDb()
);
// ------------------------------------------------------------------
// APP LOGIC
// ------------------------------------------------------------------
app.setHandler({
LAUNCH() {
return this.ask('Welches Getränk?');
},
DrinkSelectionIntent() {
console.log(this.$inputs);
},
});
module.exports.app = app;
"öffne meine trink app" "sekt"
console.log(this.$inputs) in DrinkSelectionIntent
{ drink:
{ name: 'drink',
alexaSkill:
{ name: 'drink',
value: 'sekt',
resolutions: [Object],
confirmationStatus: 'NONE',
source: 'USER' },
value: 'sekt',
key: 'Champagner',
id: '3df2482b6c2a8670322f9232582d2300' } }
Are you using the jovo debugger?
Yes, i'm using the jovo debugger. What is the difference between "inputTypes" and "types". I have to name it "inputTypes" otherwise i get this error: Input type "LIST_OF_DRINKS" must be defined in inputTypes
Oh, that's the problem here. The debugger doesn't support the mapping of synonyms yet. I will put it on a higher prioritized list, but won't be able to fix it within the next two weeks.
It works fine with the Alexa Simulator. (Install our Chrome Extension for a Jovo Debugger feeling :D https://chrome.google.com/webstore/detail/alexa-skills-kit-simulato/opjjjciodammljgdambcjmljkcjblkkk)
inputTypes
is used in the Jovo Language Model and it's the equivalent of types
in the Alexa Language Model.
We updated the Jovo Debugger. You can add the key or/and id to your requests. You need to update your project to v 2.2.17 or later.
I'm submitting a...
Expected Behavior
Synonyms do not map to the correct value.
` { "name": "DrinkSelectionIntent", "phrases": [ "{drink}", "{drink} bitte", "ich würde gerne {drink} trinken", "wir trinken {drink}", "ich trinke {drink}" ], "inputs": [ { "name": "drink", "type": "LIST_OF_DRINKS" } ] },
...
"inputTypes": [ { "name": "LIST_OF_DRINKS", "values": [ { "value": "Champagner", "synonyms": [ "Sekt" ] }, `
Current Behavior
I expect the input "Sekt" to be mapped to "Champager" in "this.$inputs". But it returns this:
{ drink: { name: 'drink', alexaSkill: { name: 'drink', value: 'sekt' }, value: 'sekt', key: 'sekt' } }
Your Environment