Added adaptive cards with buttons to display 'View Source(s)' - when source attributions are present, and Feedback (Thumbs Up, and Thumbs Down) buttons. Buttons send 'invoke' message to the bot service.
NOTES:
The bot sends an initial 'Processing...' message to the client before invoking Amazon Q, to provide faster response to user
When Amazon Q responds, the bot then updates the earlier 'Processing...' activity (I tried deleting it and sending a new message, but in Teams threads this resulted in a 'This message was deleted' message, which wasn't ideal. Using UpdateActivity avoids this.
The bot then sends an additional message containing an adaptive card with either 2 or 3 buttons - (1) ViewSource(s), if applicable, and (2) Two Feedback buttons. NOTE: I would have preferred to send the Q Response and the buttons in a single message, but the only way to do that was to put the message into the card, but this breaks markdown rendering.
I also found that the send message with the card did not reliably render immediately in the Teams client without refreshing.. adding a 2 second delay seems to resolve this effect.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Description of changes:
Added adaptive cards with buttons to display 'View Source(s)' - when source attributions are present, and Feedback (Thumbs Up, and Thumbs Down) buttons. Buttons send 'invoke' message to the bot service.
NOTES:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.