简体   繁体   中英

C# Microsoft Bot Framework -Integrate LUIS + QNA +Graph API

I have a Bot(using Microsoft Bot Framework) that has a QNA Service And Microsoft Graph API integrated with LUIS.

  1. The LUIS model acts as a dispatcher to QNA and Graph API.
  2. Based on the LUIS Intent, it gets routed to either the QNA or Graph API.
  3. Corresponding to each QNA question there is an intent configured in LUIS and for each API ,there is an intent too

Problem : I have more than 50 intents inside LUIS.I want to handle all the intents related to QNA with a generic piece of code . I want to Optimise the Code. Also I want to understand from the Intent itself whether it should go to QNA or Graph API

Question :Is there an efficient way in which I can efficiently route from LUIS Model to QNA and Graph API

Sounds like you essentially want to create an app that follows the architecture of building a LUIS app with different intents. From within each intent, you could code your bot to call information you have stored in QnAMaker or the MS Graph API.

To get started, you could follow this tutorial: Integrate QnA Maker and LUIS to distribute your knowledge base .

(Note: in this tutorial there is a small documentation bug regarding the endpoint to query QnAMaker

It says in the docs: var client = new RestClient( qnaServiceHostName + "/qnamaker/knowledgebases/" + knowledgeBaseId + "/generateAnswer");

make sure you DELETE "/qnamaker", as it is accidentally duplicated--it's already included in qnaServiceHostName)

And I don't know what it is specifically you want to accomplish with the Graph API, but there are multiple examples linked in the MS Graph GitHub here and docs on MS Graph overall here , which should help you get started on the right path as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM