Using Bot Framework SDK v-3 I was able to get the list of matching questions based on a keyword as suggested action/cards like this- Suggested actions cards in QnAMaker Dialog
Now, I am using the pre-release version SDK v-4 which uses the concepts of middle ware. So I did something like this in Startup.cs-
services.AddBot<QnABot>(options =>
{
options.CredentialProvider = new ConfigurationCredentialProvider(Configuration);
var endpoint = new QnAMakerEndpoint
{
KnowledgeBaseId = kbId,
// Get the Host from the HTTP request example at https://www.qnamaker.ai
// For GA services: https://<Service-Name>.azurewebsites.net/qnamaker
// For Preview services: https://westus.api.cognitive.microsoft.com/qnamaker/v2.0
Host = hostURL,
EndpointKey = endpointKey
};
var qnaOptions = new QnAMakerMiddlewareOptions();
qnaOptions.Top = 5;
options.Middleware.Add(new QnAMakerMiddleware(endpoint, qnaOptions));
});
I am only getting the first matching question's answer as the output in the chat window but not the matching questions as suggested action cards for the user to choose from. I used to have a separate dialog inherited from QnAMakerDialog in SDK v-3 along with the overridden function to manage my conversation flow. I am not sure how to manage that now within the middle ware as all I got from the documentation was this- QnAMaker with bot framework SDK v-4 Any help with this please?