.matches('Note.Create', [(session, args, next) => {
// Resolve and store any Note.Title entity passed from LUIS.
var intent = args.intent;
var title = builder.EntityRecognizer.findEntity(intent.entities, 'Note.Title');
var note = session.dialogData.note = {
title: title ? title.entity : null,
};
// Prompt for title
if (!note.title) {
builder.Prompts.text(session, 'What would you like to call your note?');
} else {
next();
}
},
(session, results) => {
var note = session.dialogData.note;
if (results.response) {
note.text = results.response;
}
.
.
.
}])
在上面的代码中,当用户询问What would you like to call your note?
时。用户的回复可以是My Note Title
或i would like call my note **My note Title**
或Let us call it **My Note Title**
。
所以问题是如何从对My Note Title
的响应中提取/获取Prompts
。
目前将整个回复存储在note.text = results.response;