Closed dcsan closed 7 years ago
Hi @dcsan Yes it does, please have a look at this example code: https://github.com/dmitrizzle/chat-bubble/blob/master/component/examples/4-advanced-keyboard.html
Basically you are controlling the input system with inputCallbackFn(JSONConversationObject)
as a parameter:
var givemeBubbles = new Bubbles(
document.getElementById('chat'), // DOM element
"givemeBubbles", // name of this function (for security)
{
inputCallbackFn: function({
"input" : this.value, // this is the input field value
"convo" : _convo, // this is the conversation object
"standingAnswer": standingAnswer // this variable remembers the last place where conversation ended
}){
// run the bubbles in response to keyboard input:
givemeBubbles.talk(
convo, // your JSON object that contains the conversation
key
);
}
}
)
Sorry I didn't make docs or better-readable code for this yet. There is also a way to get an NLC classifier function embedded within inputCallbackFn (that's how it's done on archie.ai)
this is a really interesting project!
does the JSON markup have any ability to fuzzy match on inputs with regex or similar? or having nodes be looked up based on some type of NLP intent/entity matching?