如何解决Microsoft QnA Maker KwnoledgeBase 跟进提示
我使用 C# SDK 快速入门来使用 QnA Maker 知识库。我想要实现的是添加后续提示
new PromptDTO {
DisplayText = item.Title,Qna = new PromptDTOQna {
Questions = new List<string> {
$"What is url to {item.Title}",},Metadata = new List<MetadataDTO> {
new MetadataDTO { Name = "Directory",Value = item.id },Answer = $"<a>{item.Url?.Url}</a>,{item.Description}",}}
当我加载我的知识库时,所有提示都链接到知识库中的第一个问题。如果我没有在创建过程中在 KB 中生成的 QnaId,我如何加载我的 KB 并进行跟进。但在像这里这样的例子中,他们没有传递任何 Id 来跟进
{
"name": "QnA Maker FAQ","qnaList": [
{
"id": 0,"answer": "You can change the default message if you use the QnAMakerDialog. See this for details: https://docs.botframework.com/en-us/azure-bot-service/templates/qnamaker/#navtitle","source": "Custom Editorial","questions": [
"How can I change the default message from QnA Maker?"
],"metadata": []
},{
"id": 0,"answer": "You can use our REST apis to create a KB. See here for details: https://docs.microsoft.com/en-us/rest/api/cognitiveservices/qnamaker/knowledgebase/create","questions": [
"How do I programmatically create a KB?"
],"metadata": [
{
"name": "category","value": "api"
}
],"context": {
"isContextOnly": false,"prompts": [
{
"displayOrder": 1,"displayText": "Update KB","qna": {
"answer": "You can use our REST apis to update your KB. See here for details: https://docs.microsoft.com/en-us/rest/api/cognitiveservices/qnamaker/knowledgebase/update","questions": [
"How do I programmatically update my KB?"
],"metadata": [
{
"name": "category","value": "api"
}
],"context": {
"isContextOnly": false,"prompts": [
{
"displayOrder": 1,"displayText": "Refresh Endpoint Keys","qna": {
"answer": "You can use our REST apis to refresh endpoint keys. See here for details: https://docs.microsoft.com/en-us/rest/api/cognitiveservices/qnamaker/endpointkeys/refreshkeys","questions": [
"How do I programmatically refresh endpoint keys?"
]
}
}
]
}
}
}
]
}
}
],"urls": [
"https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs","https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq"
],"files": [
{
"fileName": "SurfaceManual.pdf","fileUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf"
}
]
}
如何让它发挥作用?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。