voxaai / voxa-cli Goto Github PK
View Code? Open in Web Editor NEW⚒️ The perfect toolkit for your Voxa app.
License: MIT License
⚒️ The perfect toolkit for your Voxa app.
License: MIT License
We need to update all packages generated by the voxa-cli when starting a new Voxa project to their latest versions.
Using local spreadsheets causes errors with generating paths:
(node:9345) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at assertPath (path.js:39:11)
at Object.join (path.js:1152:7)
at builtIntents.intentsByPlatformAndEnvironments.map (/Users/mat/voxa-test/node_modules/voxa-cli/src/DialogflowSchema.ts:312:20)
at Array.map (<anonymous>)
at DialogflowSchema.buildIntent (/Users/mat/voxa-test/node_modules/voxa-cli/src/DialogflowSchema.ts:267:58)
at DialogflowSchema.build (/Users/mat/voxa-test/node_modules/voxa-cli/src/DialogflowSchema.ts:83:10)
at schema.invocations.map.invoc (/Users/mat/voxa-test/node_modules/voxa-cli/src/InteractionBuilder.ts:153:18)
at Array.map (<anonymous>)
at schemas.reduce (/Users/mat/voxa-test/node_modules/voxa-cli/src/InteractionBuilder.ts:152:28)
at Array.reduce (<anonymous>)
at Object.<anonymous> (/Users/mat/voxa-test/node_modules/voxa-cli/src/InteractionBuilder.ts:142:6)
at Generator.next (<anonymous>)
at fulfilled (/Users/mat/voxa-test/node_modules/voxa-cli/lib/src/InteractionBuilder.js:4:58)
It seems that the node-xlsx
module is returning a bunch of empty cells
Currently, we're generating a project (both javascript and typescript) without a .gitignore
, causing a bad experience when initializing git on the project with the node_modules
folder and other stuff. We need to add that file so it's generated by the voxa-cli
Latest aws-sdk package already has type definitions, no longer needed to include @types/aws-sdk
If for some reason theres an empty in an Office spredsheet tab the voxa interaction
command crashes
$ npx voxa interaction
(node:17537) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
at processBookData (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/voxa-cli/src/connectors/Excel.ts:100:36)
at workbook.map.book (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/voxa-cli/src/connectors/Excel.ts:53:11)
at Array.map (<anonymous>)
at readFileCreateWorkbook (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/voxa-cli/src/connectors/Excel.ts:48:19)
at arrayMap (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:639:23)
at Function.map (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:9556:14)
at interceptor (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:16993:35)
at Function.thru (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:8797:14)
at /home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:4374:28
at arrayReduce (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:683:21)
at baseWrapperValue (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:4373:14)
at LodashWrapper.wrapperValue (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/lodash/lodash.js:9052:14)
at Object.<anonymous> (/home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/voxa-cli/src/connectors/Excel.ts:91:6)
at Generator.next (<anonymous>)
at /home/armonge/workspace/vuiagency/alexa-cup/pet-assistant/node_modules/voxa-cli/lib/src/connectors/Excel.js:7:71
at new Promise (<anonymous>)
(node:17537) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:17537) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Seems like the package maybe doesn't include the typescript interaction.json template ?
$ npm install --global https://github.com/VoxaAI/voxa-cli
/home/armonge/.nvm/versions/node/v10.15.3/bin/voxa -> /home/armonge/.nvm/versions/node/v10.15.3/lib/node_modules/voxa-cli/bin/voxa.js
+ [email protected]
added 441 packages from 422 contributors in 78.905s
$ voxa
Usage: voxa create
Options:
-v, --version output the version number
-h, --help output usage information
Commands:
interaction [options] create a interaction.json
init create a new interaction.json
create Create a Voxa app
$ voxa create
? Please enter the name of your app sample
? Please enter your name/company armonge
? Which platform will the app use? Amazon Alexa
? Choose a language Typescript
? Will you use Voxa-CLI to generate the interacion model and publishing information? Yes
? Will you use the Canfulfill intent? No
? Will you use DynamoDB to save user's info? No
? Will you use Account Linking? Yes
? What analytics will you be using for this app?(Hit Enter to skip this) Dashbot
{ [Error: ENOENT: no such file or directory, stat '/home/armonge/.nvm/versions/node/v10.15.3/lib/node_modules/voxa-cli/templates/typescript/interaction.json']
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path:
'/home/armonge/.nvm/versions/node/v10.15.3/lib/node_modules/voxa-cli/templates/typescript/interaction.json' }
Something went wrong, try again
voxa-cli it's only working with node 8. If I use the command
npx voxa create
to generate a new project I get this error (when not using node 8)
Error: ENOENT: no such file or directory, open '/pathToTheProject/node_modules/voxa-cli/templates/typescript/.gitignore'
When using a file with valid locales for one platform but not for another one, 2 issues happen:
For Alexa, it tries to overwrite the invalid Alexa locales into en-US
For Dialogflow: the agent.json file gets corrupted
Running npx voxa-cli interaction
results in an uncaught promise:
$ npx voxa-cli interaction
npx: installed 213 in 9.978s
timeframe: 2136.128ms
(node:5637) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'replace' of undefined
at sanitizeView (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/Processor.ts:66:8)
at _.chain.reduce (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/Processor.ts:96:21)
at arrayReduce (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/node_modules/lodash/lodash.js:683:21)
at Function.reduce (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/node_modules/lodash/lodash.js:9683:14)
at /Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/node_modules/lodash/lodash.js:4374:28
at arrayReduce (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/node_modules/lodash/lodash.js:683:21)
at baseWrapperValue (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/node_modules/lodash/lodash.js:4373:14)
at LodashWrapper.wrapperValue (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/node_modules/lodash/lodash.js:9052:14)
at voxaSheetsViews.map (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/Processor.ts:107:8)
at Array.map (<anonymous>)
at Object.viewsProcessor (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/Processor.ts:77:26)
at new Schema (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/Schema.ts:42:18)
at new DialogflowSchema (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/DialogflowSchema.ts:56:5)
at Object.<anonymous> (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/src/InteractionBuilder.ts:109:20)
at Generator.next (<anonymous>)
at fulfilled (/Users/mat/.npm/_npx/5637/lib/node_modules/voxa-cli/lib/src/InteractionBuilder.js:4:58)
(node:5637) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5637) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
It doesn't seem like IVoxaSheet.data
is checking if it has a value
property defined before running it through the sanitizeView
function.
On the project local README it says Create a src/config/local.json file and customize it for your local setup, you can use src/config/local.example.json
suggesting to use local.example.json
from the src/config directory if the user doesn't want to create the local.json
, but on the config/index.js
file never verifies if local.json exists.
Here is the snapshot of the config/index.js
file
const path = require("path");
const env = process.env.NODE_ENV || "local";
const configFile = require(path.join(__dirname, `${env}.json`));
A better solution will be to use by default the local.example.json
This is the output of the console after running the project without having created the local.json
file
When using any language other than english the voxa-cli generates wrong utterances when using intents like AMAZON.NoIntent in dialogflow. That basically means when using de-DE your intent will have stuff like
{
"data": [
{
"text": "don't do it",
"userDefined": false,
"id": "21c0eac5-5704-5865-b24c-773b615cb456"
}
],
"isTemplate": false,
"count": 0,
"updated": 0
},
{
"data": [
{
"text": "no thanks",
"userDefined": false,
"id": "3662bc9a-4388-5aa6-a840-26345d803cd5"
}
],
"isTemplate": false,
"count": 0,
"updated": 0
}
https://github.com/VoxaAI/voxa-cli/blob/staging/src/connectors/Excel.ts#L96-L107
It doesn't seem like the data
variable is modified at all before being returned, and as far as I know it's not modified by ref either
The javascript project template has an .nvmrc file with version v8.10, probably should update to version 10, which is the latest supported by AWS Lambda. Also, the typescript project has no .nvmrc at all.
Perhaps find a way to share more of this between the 2 templates? Also, would be really cool if we could have custom templates like the ask-cli already has, even perhaps create voxa template for the ask-cli ?
After creating a new project with the voxa-cli the package.json includes gulp
and fs-extra
which are not used anywhere, at least in the javascript version.
There's also some dependencies like ask-cli
and alexa-mime
which should be devDependencies instead of dependencies
When generating the languageModels, the field slots
is added to built-in intents like:
{
"name": "AMAZON.ScrollRightIntent",
"samples": [],
"slots": []
},
{
"name": "AMAZON.PageUpIntent",
"samples": [],
"slots": []
},
{
"name": "AMAZON.PageDownIntent",
"samples": [],
"slots": []
},
{
"name": "AMAZON.MoreIntent",
"samples": [],
"slots": []
}
The Dev portal fixes this issue but we shouldn't generate invalid outputs
Voxa-cli is adding the dialog
and prompts
properties for the Dialog directives when this feature is enabled, but if the skill is not registering any intent to the dialog interface, the array is empty and this is not allowed in the Alexa's model.
"dialog": {
"intents": [],
"delegationStrategy": "SKILL_RESPONSE"
},
"prompts": []
Allow controlling webhookForSlotFilling
through the intent tab in a spreadsheet
It seems to be a part of a change to support Office 365, but in /src/connectors/utils.ts
it looks like values of "yes" and "no" are changed to true
and false
?
When we have "yes" and "no" in our Google spreadsheet as responses to YesIntent and NoIntent, they get replaced when imported in... which isn't desired!
Any info on why this functionality has specifically been put in there? Am I missing something?
Thanks!
When having multiple .xlsx files for several locales, VOXA-CLI overwrites all locales into the default one: en-US
Did all as described and was able to create AWS Lambdas using cloud formation templates provided, but was not able to understand how to connect or deploy Alexa skill that connects with Voxa deployed on AWS
convo on #20. Should we apply those validations on voxa-cli? which character should be reestricted?
It looks like the version of this package that is currently published to npm (2.0.1) doesn't run since it's looking for builder.js
which seems to have been deleted in 7059e0c, without having the reference to it in index.js
(https://github.com/VoxaAI/voxa-cli/blob/2.0.1/index.js#L10) updated.
I created a directory before creating a new project with voxa-cli and wanted to used it as my working directory. Sadly I wasn't ask If I wanted to use my current directory for my new project. I believe this could be a great improvements for not having nested directory for a project
We're currently working on implementing a PermissionsRequest in order to determine a departure location. We would like to be able to ask permission to the user to access his location.
Currently when running against a sheet for Dialogflow all slots are marked as not required.
I propose adding the ability to mark a slot as being required, possibly by using a column titled slotRequired
or something similar.
It looks like within #105 the placement of download content was changed from contentPath
to viewsPath
— is this an intentional change? It had me thrown for a while after an update to Voxa CLI stopped some things updating.
It just seems to place download files in an odd place now:
- app
- en-AU
- my-download.json << downloads are here within a directory with the language only?
- states
- sample.states.js
- synonyms
- en-AU
- list-of-...
It used to place them within the defined contentPath, which made a lot more sense!
Or could we have a downloadsPath option? So we can configure where these json files will go?
When having several locales, the field types
in the Alexa interaction model gets populated with all values from all the locales
this is an usual source of confusion, most people don't get that the this column actually means "synonym of"
LIST_OF_TERMS | synonym |
---|---|
rain | rain |
rainy day | rain |
rainstorm | rain |
rainfall | rain |
Seems like there are some outdated ruby dependencies in the gemfile used for jekyll. Let's update those
gem "ffi", ">= 1.9.24"
gem "jekyll", ">= 3.7.4"
gem "rubyzip", ">= 1.2.2"
Currently prettier is requires as a dependency in the javascript template. Also, for some reason it's not in the typescript template? is it needed at all as a dependency?
Hello, we've been following the documentation for both Voxa and Voxa-cli in order to make a simple test bot running, but without any results.
We were able to make the full deploy up to the creation of the lambda functions on aws. But now we would like to know how to connected everything together and how to test the bot.
Can you please point me in the right direction?
Thank you.
While trying to use the voxa cli to generate an alexa publishing information json i realized that it's not possible to use numbers cause they always become strings in the generated json
Example:
value | key |
---|---|
HUB | alexa.apis.custom.interfaces[0].supportedViewports[0].mode |
ROUND | alexa.apis.custom.interfaces[0].supportedViewports[0].shape |
480 | alexa.apis.custom.interfaces[0].supportedViewports[0].minWidth |
480 | alexa.apis.custom.interfaces[0].supportedViewports[0].maxWidth |
480 | alexa.apis.custom.interfaces[0].supportedViewports[0].minHeight |
480 | alexa.apis.custom.interfaces[0].supportedViewports[0].maxHeight |
Expected:
{
"supportedViewports": [
{
"mode": "HUB",
"shape": "ROUND",
"minWidth": 480,
"maxWidth": 480,
"minHeight": 480,
"maxHeight": 480
}
]
}
Actual:
{
"supportedViewports": [
{
"mode": "HUB",
"shape": "ROUND",
"minWidth": "480",
"maxWidth": "480",
"minHeight": "480",
"maxHeight": "480"
}
]
}
After creating a new project with the voxa cli some of the included packages are outdated and npm complains there's 7 vulnerability issues. Please update those dependencies in the template
Using a sheet setup like this:
ends up generating an agent configuration that looks like this:
"defaultTimezone": "Australia/Melbourne",
"webhook": [
{
"url": "https://example.org"
},
{
"username": "foo"
},
{
"password": "bar"
},
{
"available": true
},
{
"useForDomains": true
},
{
"cloudFunctionsEnabled": false
},
{
"cloudFunctionsInitialized": false
}
],
Instead of assigning keys to a webhook
object an array is created that has objects with a single property each.
Would you be interested in a PR to fix this behaviour?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.