Hi there,
I’m trying to build an application that works for both DialogFlow and Alexa starting from a pre-existing Alexa app.
Because I want to do this properly I’m trying also to setup a “dev” environment for both Alexa and Dialog flow.
So currently I have 2 Alexa Skills (prod and dev) and 2 Dialog Flow Actions (prod and dev)
This is what my project.js looks like:
// ------------------------------------------------------------------
// JOVO PROJECT CONFIGURATION
// ------------------------------------------------------------------
module.exports = {
defaultStage: 'local',
stages: {
local:{
languageModel: {
'en-GB': {
invocation: 'ebs app local',
},
'en-US': {
invocation: 'ebs app local',
},
},
endpoint: '${JOVO_WEBHOOK_URL}'
},
dev:{
languageModel: {
'en-GB': {
invocation: 'ebs app dev',
},
'en-US': {
invocation: 'ebs app dev',
},
},
alexaSkill: {
nlu: 'alexa',
skillId: 'amzn1.ask.skill.XXXXXXXXXXXXXXXXXXXXXXXX',
askProfile: 'aibuser',
endpoint: 'arn:aws:lambda:eu-west-1:XXXXXXXXXXXXXXXXXXXXXXX',
manifest: {
events: {
endpoint: {
uri: 'arn:aws:lambda:eu-west-1:XXXXXXXXXXXXXXXXXXXXXXX, // Needs to be Lambda!
},
subscriptions: [
{
eventName: 'SKILL_PERMISSION_ACCEPTED',
},
{
eventName: 'SKILL_PERMISSION_CHANGED',
}
],
},
},
},
googleAction: {
nlu: 'dialogflow',
dialogflow: {
projectId: 'XXXXXXXXX-XXXXX',
keyFile: './XXXXXXXXX-XXXXXX-XXXXXXXXXXXXX.json',
endpoint: 'https://XXXXXXXX.execute-api.eu-west-1.amazonaws.com/default/ask-custom-XXXXXXXXXXX'
}
},
},
prod:{
alexaSkill: {
nlu: 'alexa',
skillId: 'amzn1.ask.skill.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
askProfile: 'aibuser',
endpoint: 'arn:aws:lambda:eu-west-1:XXXXXXXXXXXXXXXXXXXXXXXXXXXXX,
manifest: {
events: {
endpoint: {
uri: 'arn:aws:lambda:eu-west-1:XXXXXXXXXXXXXXXXXXXXXXXXXXXXX', // Needs to be Lambda!
},
subscriptions: [
{
eventName: 'SKILL_PERMISSION_ACCEPTED',
},
{
eventName: 'SKILL_PERMISSION_CHANGED',
}
],
},
},
},
googleAction: {
nlu: 'dialogflow',
dialogflow: {
projectId: 'XXXXXXXXXXXX-XXXXX',
keyFile: './XXXXXXXX-XXXXX-XXXXXXXXXX.json',
endpoint: ' https://XXXXXXXX.execute-api.eu-west-1.amazonaws.com/default/ask-custom-XXXXXXXXXXXr'
}
}
}
}
};
Then I got the current model from my existing Alexa App and applied the --reverse --build
jovo get alexaSkill --skill-id amzn1.ask.skill.XXXXXXXXXXXXXXXXXXXXXXXX --reverse --build
Now, what I’m getting quite confused with is the adapting of the model to work on both Alexa and Dialogflow.
I had a few inputs using AWS SYSTEM ENTITIES, and I followed the instructions here
Add System Entities
For instance changing all the occurences of this:
{
"name": "Income",
"type": "AMAZON.NUMBER",
"elicitationRequired": true,
"confirmationRequired": false,
"prompts": {
"elicitation": "Elicit.Slot.1000231380677.925239295350"
}
},
To this:
{
"name": "Income",
"type": {
"alexa":"AMAZON.NUMBER",
"dialogflow":"@sys.number
},
"elicitationRequired": true,
"confirmationRequired": false,
"prompts": {
"elicitation": "Elicit.Slot.1000231380677.925239295350"
}
},
Ok this is where I get stuck, I’m trying to deploy the app on my “dev” environment for Alexa
If I build the model everything works fine:
jovo build -p alexaSkill --stage dev
But when I deploy it
jovo deploy -p alexaSkill --stage dev
I get this error:
% jovo deploy -p alexaSkill --stage dev
jovo deploy: Deploys the project to the voice platform.
>> Learn more: https://jovo.tech/docs/cli/deploy
❯ Deploying Alexa Skill (stage: dev)
↓ Updating Alexa Skill project for ASK profile aibuser [skipped]
→ Endpoint: arn:aws:lambda:eu-west-1:279380093719:function:ask-custom-ebs_test-aibuser
❯ Deploying Interaction Model, waiting for build
✖ en-GB
en-US
Enabling skill for testing
› Error: There was a problem:
›
› [ERR] askApiUpdateModel:Request is not valid.
›
› Module: jovo-cli-platform-alexa
› Hint: Parsing error due to invalid body.
›
›
Do you have any idea of what I could possibly be doing wrong?
Thanks,
Salvo