QnACardBuilder class
Provides methods to create activities containing hero cards for showing active learning or multi-turn prompt options for the QnAMakerDialog.
Methods
get |
Returns an activity with answer text and a hero card attachment, containing buttons for multi turn prompts. |
get |
Returns an activity with answer text and a hero card attachment, containing buttons for multi turn prompts. |
get |
Returns an activity with a hero card attachment, containing buttons for active learning suggestions. |
Method Details
getQnAAnswerCard(QnAMakerResult, boolean)
Returns an activity with answer text and a hero card attachment, containing buttons for multi turn prompts.
static function getQnAAnswerCard(result: QnAMakerResult, displayPreciseAnswerOnly: boolean): Partial<Activity>
Parameters
- result
- QnAMakerResult
QnAMaker result containing the answer text and multi turn prompts to be displayed.
- displayPreciseAnswerOnly
-
boolean
whether to display PreciseAnswer Only or along with source Answer text. .
Returns
Partial<Activity>
Activity representing the prompts as a card
getQnAPromptsCard(QnAMakerResult)
Returns an activity with answer text and a hero card attachment, containing buttons for multi turn prompts.
static function getQnAPromptsCard(result: QnAMakerResult): Partial<Activity>
Parameters
- result
- QnAMakerResult
QnAMaker result containing the answer text and multi turn prompts to be displayed.
Returns
Partial<Activity>
Activity representing the prompts as a card
getSuggestionsCard(string[], string, string)
Returns an activity with a hero card attachment, containing buttons for active learning suggestions.
static function getSuggestionsCard(suggestionsList: string[], cardTitle: string, cardNoMatchText: string): Partial<Activity>
Parameters
- suggestionsList
-
string[]
List of suggestions to be displayed on hero card.
- cardTitle
-
string
Title of the hero card.
- cardNoMatchText
-
string
Text for button to be added to card to allow user to select 'no match'.
Returns
Partial<Activity>
Activity representing the suggestions as a card