-3

I created the nlp bot using the bot-builder sample from the github. But it is not working properly. for Luis I am getting response but for the qna I am getting error

error message: [onTurnError] unhandled error: TypeError: Cannot read property 'map' of undefined

Koushik
  • 73
  • 1
  • 5

2 Answers2

0

This error occurs when something has gone wrong with calling the QnAMaker service. Either:

A) Your keys are wrong in your env/appsettings file

or

B) You've hit your quota for QnAMaker calls.

Please verify your QnAMaker keys are correct and if so, double check your subscription levels on you QnAMaker Knowledgebase.

JJ_Wailes
  • 2,207
  • 1
  • 9
  • 17
0

If the keys in your environment file is incorrect, here are my steps of fixing it:

  1. Go to the Microsoft QnA Maker Portal QnA Maker
  2. Select your knowledge base and publish it
  3. When you publish it, you should see the parameters for postman:

POST /knowledgebases/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/generateAnswer Host: https://zzzzzzzzz.xxxxxx.net/qnamaker Authorization: EndpointKey yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy Content-Type: application/json {"question":"<Your question>"}


The three environment parameters needed for QnA Maker are QnAKnowledgebaseId, QnAAuthKey, and QnAEndpointHostName. They correspond to the values that are provided above when you publish your QnA Maker.

  1. QnAKnowledgebaseId = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  2. QnAAuthKey = yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
  3. QnAEndpointHostName = https://zzzzzzzzz.xxxxxx.net/qnamaker

I followed the tutorial here: Tutorial: Use QnA Maker in your bot to answer questions

Hope this helps!