if(text.indexOf('T:') === 0) {
var a = text.split('T:');
var b = a[1].split('|');
lazy.learn({phrase: b[0], category: b[1]});
chat.say("I've learned - "+b[0]+" > "+b[1]);
} else if(text.indexOf('F:') === 0 ){
var a = text.split('F:');
var b = a[1].split('|');
lazy.forget({phrase: b[0], category: b[1]});
chat.say("I've forgot- "+b[0]+" > "+b[1]);
} else {
lazy.query({phrase: text}).then(function(r) {
console.log(r);
chat.say(r.response);
});
}
I teach lazy simple grettings but when i greet lazy it will return r.response undefined, but the r.details has the category "greeting". I traced it back and i found out it somehow will not store phrases.
Any idea?