Last active
October 5, 2018 18:52
-
-
Save kirkins/ce66b5fa88e17459c32e3e86a0bba45b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const botBuilder = require('claudia-bot-builder'); | |
const AIMLInterpreter = require('aimlinterpreter'); | |
var aimlInterpreter = new AIMLInterpreter({name:'Philip', age:'42'}); | |
aimlInterpreter.loadAIMLFilesIntoArray(["aiml/bot.aiml"]); | |
module.exports = botBuilder(function (request) { | |
}); | |
module.exports = botBuilder(message => { | |
aimlInterpreter.findAnswerInLoadedAIMLFiles("how do you work?", function(answer, wildCardArray, input){ | |
if(answer){ | |
return answer; | |
}else{ | |
return "no response found in aiml"; | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment