2

We have the following code snippet that is supposed to create a knowledge base:

        var createKbDto = new CreateKbDTO
        {
            Name = request.Name,
            QnaList = new List<QnADTO>(),
            Urls = new List<string>
            {
                "https://function.mydomainname.xyz.com/api/job/Facade/777/43D672205C3106BE3273C60FE423C932"
                //"https://myowndomainname.xyz.com/jobs/281735/something"
            }
        };

        var createKb = await client.Knowledgebase.CreateAsync(createKbDto);
        var createdOp = await MonitorOperationAsync(client, createKb);
        return GetKbId(createdOp);

The second fictitious URL in the Urls list above is picked up successfully and Azure knowledgebase is created. However, feeding the first URL causes the following error message to raise:

Unsupported / Invalid url(s). Failed to extract Q&A from the source

I cannot make any sense why the 2nd Url works well for the QnA maker SDK but not the first one. When I plug in the first URL in a web browser or POSTMAN, I can easily view the response in pure text on the browser or POSTMAN. Please note that the technology behind the first URL is an Azure Http-triggered function.

Any explanation or point for this problem?

Arash
  • 3,628
  • 5
  • 46
  • 70
  • 1
    Without having your real URLs, it's hard to understand / explain. Is your Function exposed using GET or POST method? Or Both? Are you sure you don't have any authentication or IP filtering on top? – Nicolas R May 14 '20 at 09:57
  • @NicolasR Thanks for the reply. The function is exposed using GET only and there is no IP filtering on top nor authentication. Here it is the URL: https://caccea77.ngrok.io/api/jobdescription/facade/2034/43D672205B3106BE3273C60FE423C632 – Arash May 14 '20 at 11:48
  • That URL doesn't seem to be of much help, as it's behind ngrok and we don't know the contents behind the URL... – Zeryth May 18 '20 at 19:48
  • Anyways, have you seen the [Troubleshooting for QnA Maker doc](https://learn.microsoft.com/en-us/azure/cognitive-services/qnamaker/troubleshooting)? It suggests that when you have an extraction error, to heed the following: "It's possible that QnA Maker can't auto-extract some question-and-answer (QnA) content from valid FAQ URLs. In such cases, you can paste the QnA content in a .txt file and see if the tool can ingest it. Alternately, you can editorially add content to your knowledge base through the QnA Maker portal." – Zeryth May 18 '20 at 19:49
  • @Zeryth I also created and hosted a simple HTTP-triggered function on cloud and produced a simple HTML content and it exhibited the same issue. The problem has nothing to do with ngrok. – Arash May 18 '20 at 21:57

0 Answers0