예제 #1
0
        /// <summary>
        /// Query the LUIS service using this request.
        /// </summary>
        /// <param name="service">LUIS service.</param>
        /// <param name="request">Query request.</param>
        /// <param name="token">Cancellation token.</param>
        /// <returns>LUIS result.</returns>
        public static async Task <LuisResult> QueryAsync(this ILuisService service, LuisRequest request, CancellationToken token)
        {
            service.ModifyRequest(request);
            var uri = service.BuildUri(request);

            return(await service.QueryAsync(uri, token));
        }
예제 #2
0
 public LuisRequest ModifyRequest(LuisRequest request)
 {
     request.Log = log;
     if (SpellCheck)
     {
         request.SpellCheck = true;
     }
     if (Staging)
     {
         request.Staging = true;
     }
     if (Verbose)
     {
         request.Verbose = true;
     }
     return(request);
 }
예제 #3
0
 public LuisRequest ModifyRequest(LuisRequest request)
 {
     if (AllowSampling)
     {
         request.AllowSampling = true;
     }
     if (SpellCheck)
     {
         request.SpellCheck = true;
     }
     if (Staging)
     {
         request.Staging = true;
     }
     if (Verbose)
     {
         request.Verbose = true;
     }
     return(request);
 }
예제 #4
0
 public LuisRequest ModifyRequest(LuisRequest request)
 {
     Options.Apply(request);
     return(request);
 }
예제 #5
0
 Uri ILuisService.BuildUri(LuisRequest luisRequest)
 {
     return(luisRequest.BuildUri(this.model));
 }
예제 #6
0
 public LuisRequest ModifyRequest(LuisRequest request)
 {
     return(model.ModifyRequest(request));
 }