Basically, I have this code from the official documentation. What I'm trying to achieve is to get the list of question-answer pairs that are the closest to the user's input.
async def on_message_activity(self, turn_context: TurnContext):
# The actual call to the QnA Maker service.
response = await self.qna_maker.get_answers(turn_context)
if response:
await turn_context.send_activity(MessageFactory.text(response[0]))
else:
await turn_context.send_activity("No QnA Maker answers were found.")