问题
We implemented a simple Azure bot using a QnA Maker knowledge base and we enabled the Teams channel.
In the webChat, the markdown formatting is rendered just fine. However in Teams the markdown formatting is not always working as expected:
- If there is not any prompt in the answer, the formatting is perfect
- If there is a prompt in the answer, the Markdown formatting is not rendered as expected
I attach the link of a screenshot illustrating the issue: Screenshot Illustrating the issue
Did you already experience this issue? Any idea about how we could fix this?
Thanks in advance for your help!
回答1:
There isn't a way to format normal text messages in Teams. If you want to apply formatting, you need to rather look at sending one of the supported types of Cards, such as Adaptive Card, which supports Markdown. More can be seen here, in particular about newline.
If you're only really worried about newline characters, you could consider splitting it up in your bot, and sending multiple text messages. It's not clear what the "prompt text" button is from your example though - if you want more info on that, please supply more information.
Hope that helps
回答2:
I am able to use HTML for formatting. It seems to work better for me than anything else. Occasionally QnaMaker will mess up the formatting, and I have to correct it again, but generally it works.
来源:https://stackoverflow.com/questions/60323585/qna-maker-bot-formatting-issue-in-teams