relu-core
Version:
36 lines (35 loc) • 1.4 kB
JavaScript
;
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var ActionSet_1 = require("./ActionSet");
var ResumeReason;
(function (ResumeReason) {
ResumeReason[ResumeReason["completed"] = 0] = "completed";
ResumeReason[ResumeReason["notCompleted"] = 1] = "notCompleted";
ResumeReason[ResumeReason["canceled"] = 2] = "canceled";
ResumeReason[ResumeReason["back"] = 3] = "back";
ResumeReason[ResumeReason["forward"] = 4] = "forward";
ResumeReason[ResumeReason["reprompt"] = 5] = "reprompt";
})(ResumeReason = exports.ResumeReason || (exports.ResumeReason = {}));
var Dialog = (function (_super) {
__extends(Dialog, _super);
function Dialog() {
return _super.apply(this, arguments) || this;
}
Dialog.prototype.begin = function (session, args) {
this.replyReceived(session);
};
Dialog.prototype.dialogResumed = function (session, result) {
if (result.error) {
session.error(result.error);
}
};
Dialog.prototype.recognize = function (context, cb) {
cb(null, { score: 0.1 });
};
return Dialog;
}(ActionSet_1.ActionSet));
exports.Dialog = Dialog;