microsoft / BotFramework-Composer

Dialog creation and management for Microsoft Bot Framework Applications
https://docs.microsoft.com/en-us/composer/
MIT License
870 stars 372 forks source link

QnA Maker integration - Composer settings to written to appsettings.json #1538

Closed stephanbisser closed 5 years ago

stephanbisser commented 5 years ago

Whenever I add the QnA Maker KB details to the Composer's settings in the UI, those values are not written to the appsettings.json of my bot and therefore, the QnA Maker is not reachable and I get "Object not set to instance of an object" as a bot's reply in the emulator after trying to query QnA Maker.

However, if I insert the KBid, Key and Host directly into the "Connect to QnA Knowledgebase" in the dialog, this is working...

This is the content of my bot's appsettings.json after Restarting from Composer:

{
  "microsoftAppId": "",
  "bot": "ComposerDialogs",
  "cosmosDb": {
    "authKey": "",
    "collectionId": "botstate-collection",
    "cosmosDBEndpoint": "",
    "databaseId": "botstate-db"
  },
  "applicationInsights": {
    "InstrumentationKey": ""
  },
  "blobStorage": {
    "connectionString": "",
    "container": "transcripts"
  }
}

Version

Application SHA - test

Browser

What browser are you using?

OS

What operating system are you using?

cwhitten commented 5 years ago

@stephanbisser are you connecting to the bot once you've deployed, or is the bot running locally?

hibrenda commented 5 years ago

QnA maker settings are correctly set into appsettings but the endpoint key does not handle correctly.

VanyLaw commented 5 years ago

@hibrenda It's because the botproject(runtime) read qna.endpointkey from disk before. Now, we need to send this from composer server to botproject(runtime).

stephanbisser commented 5 years ago

@cwhitten I connect to my local running bot as I have not deployed it yet...

cwhitten commented 5 years ago

Hi @stephanbisser, this should be addressed in the master branch via https://github.com/microsoft/BotFramework-Composer/pull/1571

stephanbisser commented 5 years ago

Thanks a lot @cwhitten working now!