I'm rather new with these technologies so bear with me. I have successfully deployed Bot Framework and linked QnA Maker to it. I am using Adaptive Card for first response and i want images in that adaptive card to (when clicked) to generate answer from QnA Maker. How can i link these images to generate QnA Maker answer? Is there a way to just give it URL that would trigger QnA Maker?
1
votes
Welcome to Stack Overflow. Please have a look at the handy guide to see the steps you can take to get a better answer faster: stackoverflow.com/help/how-to-ask
– Kyle Delaney
What channel are you using?
– Kyle Delaney
If i understand correctly what you mean by channel, i am currently just testing out in Visual Studio + Bot Emulator. Later purpose is to webchat, direct line and teams channels.
– Sp4t4
Stevie's answer will not work in Teams. See my blog post for more info: blog.botframework.com/2019/07/02/…
– Kyle Delaney
1 Answers
1
votes
You could use the data property in your Adaptive Card to send a message payload to the Bot, which would then trigger the QnA answer.
For example, in the data property, if you put something like 'How do I upload a file', so when the image is clicked, the payload will be 'How do I upload a file' and will be sent to the Bot, where the QnA service should respond in kind with the correct answer.
{
"type": "AdaptiveCard",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "Image",
"style": "Person",
"url": "${creator.profileImage}",
"size": "Small",
"selectAction": {
"type": "Action.Submit",
"id": "image",
"title": "image",
"data": "show me the text 'image'"
}
}
],
"width": "auto"
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2"
}