ava-ia / core Goto Github PK
View Code? Open in Web Editor NEWAgnostic Virtual Assistant
Agnostic Virtual Assistant
When I create a custom action that adds the action property to state it fails with Error: Unknown action
.
export default (state) => {
state.action = {
value: 'I fail'
};
return state;
}
When I change my action to use a promise it still fails in the same way.
Hey I'm trying out the example from the readme file, but I'm getting an error.
Here's the code for the example:
'use strict'
var Ava = require("ava-ia").Ava;
var weather = require('ava-ia/lib/intents').weather;
var movie = require('ava-ia/lib/intents').movie;
var forecastYahoo = require("ava-ia/lib/actions").forecastYahoo;
var forecastMSN = require("ava-ia/lib/actions").forecastMSN;
var movieDB = require("ava-ia/lib/actions").movieDB;
// 1. New instance
const ava = new Ava({
debug: true // If you want see intents/actions trace log.
});
// 2. Configure the intents
ava
.intent(weather, [forecastYahoo, forecastMSN])
.intent(movie, movieDB);
// 3. Chat with Ava
ava.listen('Do you know if tomorrow will rain in Bangkok?')
.then(state => console.log(state))
.catch(error => console.log(state))
And here's the error I'm getting:
/home/fernandodoglio/workspace/personal/ava/node_modules/ava-ia/lib/helpers/factoryActions.js:10
var ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee(state, actions) {
^ReferenceError: regeneratorRuntime is not defined
at /home/fernandodoglio/workspace/personal/ava/node_modules/ava-ia/lib/helpers/factoryActions.js:10:31
at Object. (/home/fernandodoglio/workspace/personal/ava/node_modules/ava-ia/lib/helpers/factoryActions.js:36:2)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/home/fernandodoglio/workspace/personal/ava/node_modules/ava-ia/lib/helpers/index.js:43:23)
at Module._compile (module.js:409:26)
I'm also interested in how to create new intents and actions then consume in the browser via nlp-compromise.
Thanks,
Jeff
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.