In order to auto generate a bot file you have to use botbuilder-tools. For some reason the instructions are missing in that samples readme I will work on getting that updated ASAP.
You can install the tools by running this command in command line:
npm install -g chatdown msbot ludown luis-apis qnamaker botdispatch luisgen
You will need to have there installed:
- Node.js version 8.5 or higher
- .NET Core SDK version 2.1.403 or higher
Then you will have to run the msbot init
command with the options you need, a list of options can be found here
and an example command would look like this:
msbot init --name TestBot --endpoint http://localhost:9499/api/messages
Then you will need to add the qnamaker service, there is information about adding this and other services here
an example of the command you would run to add the qnamaker service would look like this:
msbot connect qna --name "<NAME>" --kbId <KNOWLEDGE BASE ID> --subscriptionKey <SUBSCRIPTION KEY> --endpointKey <ENDPOINT-KEY> --hostname "https://myqna.azurewebsites.net"
When you are done you will have a .bot file that will look like this:
{
"name": "qnamaker2",
"services": [
{
"type": "endpoint",
"name": "qnamaker2",
"endpoint": "http://localhost:3978/api/messages",
"appId": "",
"appPassword": "",
"id": "0"
},
{
"type": "qna",
"name": "{YOUR QnA APP NAME}",
"kbId": "{YOUR KNOWLEDGEBASE ID}",
"subscriptionKey": "{YOUR SUBSCRIPTION KEY}",
"endpointKey": "{your endpoint key}",
"hostname": "{YOUR HOSTNAME}",
"id": "74"
}
],
"padlock": "",
"version": "2.0"
}