QnA Maker 回應文字中支援的 Markdown 格式

QnA Maker 會將回應文字儲存為 Markdown。 Markdown 有許多口味。 若要確定回應文字已傳回並正確顯示,請使用此參考。

使用 CommonMark 教學課程來驗證您的 Markdown。 本教學課程有試用 功能 ,可快速複製/貼上驗證。

何時使用 RTF 編輯與 Markdown

答案的 RTF 編輯 可讓您以作者身分使用格式化工具列快速選取及格式化文字。

當您需要自動產生內容以建立要匯入為 CI/CD 管線一部分或批次測試的 知識庫 時,Markdown 是更好的工具。

支援的 Markdown 格式

以下是您可以在 QnA Maker 回應文字中使用的 Markdown 格式清單。

目的 格式 範例 Markdown 轉譯
如聊天機器人所示
2 個句子之間的新行。 \n\n How can I create a bot with \n\n QnA Maker? format new line between two sentences
從 h1 到 h6 的 # 標頭數目代表哪一個標頭。 1 # 是 h1。 \n# text \n## text \n### text \n####text \n#####text ## Creating a bot \n ...text.... \n### Important news\n ...text... \n### Related Information\n ....text...

\n# my h1 \n## my h2\n### my h3 \n#### my h4 \n##### my h5
format with markdown headers
format with markdown headers H1 to H5
斜體 *text* How do I create a bot with *QnA Maker*? format with italics
強(粗體) **text** How do I create a bot with **QnA Maker**? format with strong marking for bold
連結的 URL [text](https://www.my.com) How do I create a bot with [QnA Maker](https://www.qnamaker.ai)? format for URL (hyperlink)
*公用影像的 URL ![text](https://www.my.com/image.png) How can I create a bot with ![QnAMaker](https://review.learn.microsoft.com/azure/ai-services/qnamaker/media/qnamaker-how-to-key-management/qnamaker-resource-list.png) format for public image URL
刪除線 ~~text~~ some ~~questoins~~ questions need to be asked format for strikethrough
粗體和斜體 ***text*** How can I create a ***QnA Maker*** bot? format for bold and italics
連結的粗體 URL [**text**](https://www.my.com) How do I create a bot with [**QnA Maker**](https://www.qnamaker.ai)? format for bold URL
連結的斜體 URL [*text*](https://www.my.com) How do I create a bot with [*QnA Maker*](https://www.qnamaker.ai)? format for italics URL
逸出 Markdown 符號 \*text\* How do I create a bot with \*QnA Maker\*? Format for escape markdown symbols.
已排序的清單 \n 1. item1 \n 1. item2 This is an ordered list: \n 1. List item 1 \n 1. List item 2
上述範例使用 Markdown 內建的自動編號。
This is an ordered list: \n 1. List item 1 \n 2. List item 2
上述範例會使用明確的編號。
format for ordered list
未排序清單 \n * item1 \n * item2

\n - item1 \n - item2
This is an unordered list: \n * List item 1 \n * List item 2 format for unordered list
巢狀清單 \n * Parent1 \n\t * Child1 \n\t * Child2 \n * Parent2

\n * Parent1 \n\t 1. Child1 \n\t * Child2 \n 1. Parent2

您可以將已排序和未排序的清單巢狀在一起。 索引卷標 \t表示子元素的縮排層級。
This is an unordered list: \n * List item 1 \n\t * Child1 \n\t * Child2 \n * List item 2

This is an ordered nested list: \n 1. Parent1 \n\t 1. Child1 \n\t 1. Child2 \n 1. Parent2
format for nested unordered list
format for nested ordered list

*QnA Maker 不會以任何方式處理映像。 這是用戶端應用程式用來轉譯影像的角色。

如果您想要使用更新/取代來新增內容,知識庫 API 和內容/檔案包含 html 標記,您可以藉由確保以編碼格式轉換標記的開啟和關閉,以保留檔案中的 HTML。

保留 HTML API 要求中的表示法 KB 中的表示法
Yes
<Br>
Yes

header

<h3>標頭</h3>

此外,KB 中的 CR LF(\r\n) 會轉換成 \n。 LF(\n) 維持不變。 如果您想要逸出任何逸出序列,例如 \t 或 \n,您可以使用反斜杠,例如:'\\r\\n' 和 '\\t'

下一步

檢閱批次測試 檔格式