jovotech / jovo-framework

🔈 The React for Voice and Chat: Build Apps for Alexa, Messenger, Instagram, the Web, and more
https://www.jovo.tech
Apache License 2.0
1.67k stars 310 forks source link

ERR: jovo Build --reverse #192

Closed soltrinox closed 6 years ago

soltrinox commented 6 years ago

I'm submitting a...

Expected Behavior

Import and reverse the intents from Google Dialog Flow

Current Behavior

Fails on reverse from en

Error log

jovo build googleAction --reverse

   ❯ Building language model platform model
     ❯ Reversing model files
       ✖ en
         -> Cannot read property 'substr' of undefined
{ TypeError: Cannot read property 'substr' of undefined
    at Function.reverse (/usr/lib/node_modules/jovo-cli/helper/dialogFlowAgent.js:182:60)

Your Environment

soltrinox commented 6 years ago

also it is not importing en-US intents from dialogFlow when you run 'jovo get'

jankoenig commented 6 years ago

Hey there. Could you share a little more about your setup on Dialogflow? So it seems like you have en and en-US as locales? Anything else that's helpful for us to debug?

Also, which version of the Jovo CLI are you using? (jovo -v)

soltrinox commented 6 years ago

I have noticed, that the CLI does not import the en-US locale intents off of Google.. Is there something missing in the app.json which prevents this? Is there a specific section of my APP.json i am missing?

'''''' { "googleAction": { "nlu": { "name": "dialogflow", "version": 2 } }, "endpoint": "https://webhook.jovo.cloud/c0f62ef0-4551-4cb8-9ff8-ab2a72b8f2fc", "alexaSkill": { "nlu": "alexa" } } ''''''

I am using the latest 1.1.8 jovo

soltrinox commented 6 years ago

So there are several thing i have noticed with the Google 'jovo build --reverse' and the 'jovo get googleAction' the support for multiple locales is not getting the full intent list for all listed locales.

If you have pre-existing intents the jovo get will not import anything but the base 'en' locale and ignores en-US or others.

aswetlow commented 6 years ago

Hey @soltrinox Sorry for the long wait. It should be fixed now (jovo cli v1.1.13). Let me know if you still run into any problems.

soltrinox commented 6 years ago

What should the app.json reflect in order to get all locale from dialogFlow ?

Mine looks like this :

{ "googleAction": { "nlu": { "name": "dialogflow", "version": 2 }, "dialogflow": { "projectId": "xxxxx-c88a6", "keyFile": "xxxxx-c88a6-cdf110cf88c5.json" } }, "endpoint": "https://webhook.jovo.cloud/xxxxx-xxxxxxxxxx-xxxxx2fc" }

I sued the starter JOVO project to create this from 👍 https://github.com/jovotech/jovo-sample-voice-app-nodejs

Which has not been updated in 5 months. Is there some updates to this to get it current witht he CLI ?

soltrinox commented 6 years ago

https://github.com/jovotech/jovo-sample-voice-app-nodejs/issues/5

aswetlow commented 6 years ago

Hey @soltrinox

In my case jovo get googleAction downloaded all locales from the project to /platforms/googleAction/dialogflow. After jovo build --reverse everything is generated to the language specific Jovo Language Model files to /models

Have you updated the Jovo CLI to version 1.1.13? You should also do npm install jovo-framework in your project folder.