Ms_ Dev

Ms_ Dev

  • NA
  • 236
  • 91.6k

Microsoft Bot Endpoint URL in project

Apr 21 2017 12:57 AM
Hi,
 
How should i include the endpoint url from the Luis.ai in my project to get the LuisIntent.
 
Endpointurl: https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/........ 
 
MessageController:
  1. public async Task<HttpResponseMessage> Post([FromBody]Activity activity)  
  2.        {  
  3.            if (activity.Type == ActivityTypes.Message)  
  4.            {  
  5.                await Conversation.SendAsync(activity,() => new BotLuisDialog());  
  6.               
  7.            }  
  8.            else  
  9.            { 
  10.                HandleSystemMessage(activity);  
  11.            }  
  12.            var response = Request.CreateResponse(HttpStatusCode.OK);  
  13.            return response;  
  14.        }  
 BotDialog:
  1. [LuisModel("10035b6 MY KEYS""5dbb54 PROGRAMMATIC API KEYS")] 
  2. [Serializable]  
  3. public class BotLuisDialog : LuisDialog<object>  
  4. {     
  5.     [LuisIntent("Greeting")]  
  6.     public async Task WelcomeGreeting(IDialogContext context, string messageText)  
  7.     {  
  8.         await context.PostAsync("Hello there, How can i help you?");  
  9.         context.Wait(MessageReceived);  
  10.     }
  11. }  
 Tell me where should i place the endpint url with method to get the intents.
 
Thanks, 

Answers (1)