我不熟悉那种确切的方法(您介意链接到教程的部分吗?),但是您可以创建一个选择提示操作(来自 AskingQuestionsSample 的选择输入操作是一个很好的例子)。我将我的设置为 style suggestedaction
,然后我也将 my 设置allowInterruptions
为 true (我的取消和帮助意图/对话框在我的主对话框中)。
"actions": [
{
"$kind": "Microsoft.ChoiceInput",
"$designer": {
"id": "673028",
"name": "Prompt with multi-choice"
},
"property": "user.style",
"prompt": "Please select a value from below:",
"maxTurnCount": 3,
"alwaysPrompt": true,
"allowInterruptions": "true",
"outputFormat": "value",
"choices": [
{
"value": "Cancel"
},
{
"value": "Help"
}
],
"defaultLocale": "en-us",
"style": "suggestedAction",
"choiceOptions": {
"inlineSeparator": ", ",
"inlineOr": " or ",
"inlineOrMore": ", or ",
"includeNumbers": true
},
"recognizerOptions": {
"noValue": false,
"noAction": false,
"recognizeOrdinals": true
}
}