RE: Dealing with sets in AIML on botlibre |
If you define all of the bot's responses with one of these keywords, then the bot will use its default response for any off topic question. You can have your default response respond however you wish, or not respond at all using the following template,
var hasKeyword = false;
for (word in sentence.word) {
if (word.has(#instantiation, #keyword)) {
hasKeyword = true;
break;
}
}
You can create a JSON file to tag your keywords,
[
{#data:"security",instantiation:#keyword}
{#data:"hackers",instantiation:#keyword}
]
|
|
|
|
|