I've created a bot after publishing the Azure QnA service knowledge base. I've added the metadata to each question answer pairs to denote the source of information. Now, I want to change the bot code to limit the knowledge base search using the metadata filter. Basically, Bot would initially prompt users to input source (for eg HR, Finance, Legal) and use that input further to only search through question answers pairs tagged to it.
bot source code that is used -> https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/javascript_nodejs/48.customQABot-all-features
How can I change this code to return answers linked to specified metadata/user input dynamically?
please note README.md does provide information about how to filter answers by passing metadata but it has used static value ({ key: 'Language', value: 'Javascript' }).
I want to pass user input from CustomQABot.js to rootDialog.js so that it will be used in rootDialog.js to filter answers.
any input would be greatly appreciated. Thanks.
ps - I don't know much about node.js so it's very hard for me to understand the program flow.