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? 格式化兩個句子之間的新行
從 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
使用 Markdown 標頭的格式
使用 Markdown 標頭 H1 到 H5 的格式
斜體 *text* How do I create a bot with *QnA Maker*? 使用斜體格式
強(粗體) **text** How do I create a bot with **QnA Maker**? 具有粗體強標記的格式
連結的 URL [text](https://www.my.com) How do I create a bot with [QnA Maker](https://www.qnamaker.ai)? URL 格式 (超連結)
*公用影像的 URL ![text](https://www.my.com/image.png) How can I create a bot with ![QnAMaker](https://review.video2.skills-academy.com/azure/ai-services/qnamaker/media/qnamaker-how-to-key-management/qnamaker-resource-list.png) 公用影像 URL 的格式
刪除線 ~~text~~ some ~~questoins~~ questions need to be asked 刪除線的格式
粗體和斜體 ***text*** How can I create a ***QnA Maker*** bot? 粗體和斜體的格式
連結的粗體 URL [**text**](https://www.my.com) How do I create a bot with [**QnA Maker**](https://www.qnamaker.ai)? 粗體 URL 的格式
連結的斜體 URL [*text*](https://www.my.com) How do I create a bot with [*QnA Maker*](https://www.qnamaker.ai)? 斜體 URL 的格式
逸出 Markdown 符號 \*text\* How do I create a bot with \*QnA Maker\*? 逸出 Markdown 符號的格式。
已排序的清單 \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
上述範例會使用明確的編號。
已排序列表的格式
未排序清單 \n * item1 \n * item2

\n - item1 \n - item2
This is an unordered list: \n * List item 1 \n * List item 2 未排序列表的格式
巢狀清單 \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
巢狀未排序列表的格式
巢狀排序列表的格式

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

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

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

header

<h3>標頭</h3>

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

下一步

檢閱批次測試 檔格式