MicrosoftDocs / feedback

📢 docs.microsoft.com site feedback
https://learn.microsoft.com
Creative Commons Attribution 4.0 International
240 stars 159 forks source link

QnA Maker API - Create. KnowledgeBase not created if using qnaId in prompts section #2560

Open LauraFoulquier opened 4 years ago

LauraFoulquier commented 4 years ago

Link to article: https://docs.microsoft.com/en-us/rest/api/cognitiveservices/qnamaker/knowledgebase/create

Problem: I have been trying to create a new KB using the API and the key qnaId in prompts section. The status comes back as Accepted (202) but the KB is not created (does not appear). Here is the body I have been trying to submit (works fine without the prompts section):

{
    "name": "myKB",
    "language": "English",
    "qnaList": [
        {
            "id": 0,
            "answer": "text1",
            "source": "Editorial",
            "questions": [
                "question1
            ],
            "metadata": [
                {
                    "name": "1",
                    "value": "true"
                },
                {
                    "name": "2",
                    "value": "true"
                }
            ],
            "context": {
                "isContextOnly": false,
                "prompts": [
                    {
                        "displayOrder": 0,
                        "displayText": "Get more help",
                        "qnaId": 66
                    }
                ]
            }
        }
    ]
}

I have also tried with no success :

"prompts": [
                    {
                        "displayOrder": 0,
                        "displayText": "Get more help",
                        "qnaId": 66,
                        "qna": null
                    }
                ]

Would you have a working example using qnaId instead of qna ? Is this a bug ? Thanks

welcome[bot] commented 4 years ago

Thank you for creating the issue! One of our team members will get back to you shortly with additional information. If this is a product issue, please close this and contact the particular product's support instead (see https://support.microsoft.com/allproducts for the list of support websites).

rootsmusic commented 3 years ago

@LauraFoulquier Please move this issue to https://github.com/MicrosoftDocs/azure-docs/issues