我想獲得builder.Prompt.choice(...)的響應;選擇列表被加載,當我做出選擇時,什麼都不會發生。如何從提示在Bot框架對話框中獲得結果
但似乎並不像function(session, results)
永遠得到執行。 session.send("Choice Made)
而其他代碼不會被執行。我怎樣才能得到我的迴應。我不確定這裏發生了什麼問題。它看起來就像來自文檔的代碼。
bot.dialog('LifecycleDialog', function (session, args) {
var softwareEntity = builder.EntityRecognizer.findEntity(args.intent.entities, 'Software');
var choices = Object.keys(SoftwareDict[softwareEntity.entity]);
builder.Prompts.choice(session, "Select a version by typing the number: ", choices, "Sorry I don't see that version.");
},
function (session, results) {
session.send("Choice Made"); //DOES NOT WORK
session.endDialogWithResult(results); //DOES NOT WORK
}).triggerAction({
matches: 'LifecycleStatus'
});
是否有可能用triggerAction做到這一點?所有的例子都只是對話,語法略有不同。 –