Пример #1
0
 public LuisBusinessLogic(ILuisProxy luisProxy, ILuisSettings luisSettings, ITopicsResourcesBusinessLogic topicsResourcesBusinessLogic, IWebSearchBusinessLogic webSearchBusinessLogic, IBingSettings bingSettings)
 {
     this.luisSettings = luisSettings;
     this.luisProxy    = luisProxy;
     this.topicsResourcesBusinessLogic = topicsResourcesBusinessLogic;
     this.webSearchBusinessLogic       = webSearchBusinessLogic;
     this.bingSettings = bingSettings;
 }
Пример #2
0
        public LuisProxyTests()
        {
            luisSettings      = Substitute.For <ILuisSettings>();
            httpClientService = Substitute.For <IHttpClientService>();
            luisProxy         = new LuisProxy(httpClientService, luisSettings);

            luisSettings.Endpoint.Returns(new Uri("https://www.luis.ai/home"));
            luisSettings.TopIntentsCount.Returns(3);
            luisSettings.IntentAccuracyThreshold.Returns(0.9M);
        }
Пример #3
0
        public LuisBusinessLogicTests()
        {
            luisProxy    = Substitute.For <ILuisProxy>();
            luisSettings = Substitute.For <ILuisSettings>();
            topicsResourcesBusinessLogic = Substitute.For <ITopicsResourcesBusinessLogic>();
            webSearchBusinessLogic       = Substitute.For <IWebSearchBusinessLogic>();
            luis              = Substitute.For <ILuisBusinessLogic>();
            bingSettings      = Substitute.For <IBingSettings>();
            luisBusinessLogic = new LuisBusinessLogic(luisProxy, luisSettings, topicsResourcesBusinessLogic, webSearchBusinessLogic, bingSettings);

            luisSettings.Endpoint.Returns(new Uri("http://www.bing.com"));
            luisSettings.TopIntentsCount.Returns(3);
            luisSettings.IntentAccuracyThreshold.Returns(0.1M);
            bingSettings.BingSearchUrl.Returns(new Uri("http://www.bing.com?{0}{1}{2}"));
            bingSettings.CustomConfigId.Returns("0");
            bingSettings.PageResultsCount.Returns((short)10);
            bingSettings.PageOffsetValue.Returns((short)1);
        }
Пример #4
0
 public LuisProxy(IHttpClientService httpClientService, ILuisSettings luisSettings)
 {
     this.luisSettings      = luisSettings;
     this.httpClientService = httpClientService;
 }