예제 #1
0
        // Dependency injection uses this constructor to instantiate MainDialog
        public MainDialog(FlightBookingRecognizer luisRecognizer,
                          WooliesXChatbotRecognizer luisWooliesXChatbotRecognizer,
                          BookingDialog bookingDialog,
                          FindPromotionsDialog findPromotionsDialog,
                          GetShoppingListDialog getShoppingListDialog,
                          ILogger <MainDialog> logger)
            : base(nameof(MainDialog))
        {
            _luisRecognizer = luisRecognizer;
            _luisWooliesXChatbotRecognizer = luisWooliesXChatbotRecognizer;
            Logger = logger;

            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(bookingDialog);
            AddDialog(findPromotionsDialog);
            AddDialog(getShoppingListDialog);
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                IntroStepAsync,
                ActStepAsync,
                FinalStepAsync,
            }));

            // The initial child Dialog to run.
            InitialDialogId = nameof(WaterfallDialog);
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HRDialog"/> class.
 /// </summary>
 /// <param name="bookingDialog">The booking dialog.</param>
 public HRDialog(BookingDialog bookingDialog) : base(nameof(HRDialog))
 {
     AddDialog(new TextPrompt(nameof(TextPrompt)));
     AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt)));
     AddDialog(bookingDialog);
     AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
     {
         QueryTypeAsync,
         RouteDecisionAsync,
         FinalStepAsync,
     }));
     InitialDialogId = nameof(WaterfallDialog);
 }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SkuLookupDialog" /> class.
        /// </summary>
        /// <param name="bookingDialog">The booking dialog.</param>
        public SkuLookupDialog(BookingDialog bookingDialog, StockRepository stockRepository) : base(nameof(SkuLookupDialog))
        {
            _stockRepo = stockRepository;

            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt)));
            AddDialog(bookingDialog);
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                LookupStepAsync,
                RouteStockStepAsync,
                FinalStepAsync,
            }));
            InitialDialogId = nameof(WaterfallDialog);
        }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AccountDialog"/> class.
 /// </summary>
 /// <param name="bookingDialog">The booking dialog.</param>
 public AccountDialog(BookingDialog bookingDialog) : base(nameof(AccountDialog))
 {
     AddDialog(new TextPrompt(nameof(TextPrompt)));
     AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt)));
     AddDialog(bookingDialog);
     AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
     {
         TitleStepAsync,
         FirstNameStepAsync,
         LastNameStepAsync,
         IdentityNumberStepAsync,
         CellNumberStepAsync,
         ConfirmationStepAsync,
         FinalStepAsync,
     }));
     InitialDialogId = nameof(WaterfallDialog);
 }
예제 #5
0
        // Dependency injection uses this constructor to instantiate MainDialog
        public MainDialog(FAConnectIntentRecognizer luisRecognizer, BookingDialog bookingDialog, IHostingEnvironment hostingEnvironment, ILogger <MainDialog> logger)
            : base(nameof(MainDialog))
        {
            _luisRecognizer     = luisRecognizer;
            Logger              = logger;
            _hostingEnvironment = hostingEnvironment;

            AddDialog(new TextPrompt(nameof(TextPrompt)));
            // AddDialog(bookingDialog);
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                HandleFAConnect
            }));

            // The initial child Dialog to run.
            InitialDialogId = nameof(WaterfallDialog);
        }
예제 #6
0
        // Dependency injection uses this constructor to instantiate MainDialog
        public MainDialog(FlightBookingRecognizer luisRecognizer, BookingDialog bookingDialog, ILogger <MainDialog> logger)
            : base(nameof(MainDialog))
        {
            _luisRecognizer = luisRecognizer;
            Logger          = logger;

            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(bookingDialog);
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                IntroStepAsync,
                ActStepAsync,
                FinalStepAsync,
            }));

            // The initial child Dialog to run.
            InitialDialogId = nameof(WaterfallDialog);
        }
예제 #7
0
        // Dependency injection uses this constructor to instantiate MainDialog
        public MainDialog(FlightBookingRecognizer luisRecognizer, BookingDialog bookingDialog, IBotTelemetryClient telemetryClient, ILogger <MainDialog> logger)
            : base(nameof(MainDialog))
        {
            _luisRecognizer = luisRecognizer;
            Logger          = logger;

            // Set the telemetry client for this and all child dialogs
            this.TelemetryClient = telemetryClient;

            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(bookingDialog);
            AddDialog(new WaterfallDialog(
                          nameof(WaterfallDialog),
                          new WaterfallStep[] { IntroStepAsync, ActStepAsync, FinalStepAsync, }));

            // The initial child Dialog to run.
            InitialDialogId = nameof(WaterfallDialog);
        }
예제 #8
0
        public MainDialog(BotServices luisRecognizer, BookingDialog bookingDialog, ILogger <MainDialog> logger, IBotServices botServices, FlightBookingRecognizer luisRecognizers)
            : base(nameof(MainDialog))
        {
            _luisRecognizer  = luisRecognizer;
            _logger          = logger;
            _botServices     = botServices;
            _luisRecognizers = luisRecognizers;

            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(bookingDialog);
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                IntroStepAsync,
                ActStepAsync,
                FinalStepAsync,
            }));

            InitialDialogId = nameof(WaterfallDialog);
        }
예제 #9
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FindStockDialog"/> class.
        /// </summary>
        public FindStockDialog(BookingDialog bookingDialog, StockRepository stockRepository) : base(nameof(FindStockDialog))
        {
            _stockRepo = stockRepository;

            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt)));
            AddDialog(bookingDialog);
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                GarmentStepAsync,
                BrandStepAsync,
                ColorStepAsync,
                SizeStepAsync,
                RouteStockStepAsync,
                FinalStepAsync,
            }));

            // The initial child Dialog to run.
            InitialDialogId = nameof(WaterfallDialog);
        }
예제 #10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainDialog" /> class.
        /// </summary>
        /// <param name="luisRecognizer">The luis recognizer.</param>
        /// <param name="bookingDialog">The booking dialog.</param>
        /// <param name="findStockDialog">The find stock dialog.</param>
        /// <param name="accountDialog">The account dialog.</param>
        /// <param name="stockRepository">The stock repository.</param>
        /// <param name="logger">The logger.</param>
        public MainDialog(FlightBookingRecognizer luisRecognizer, BookingDialog bookingDialog, FindStockDialog findStockDialog, HRDialog hrDialog, AccountDialog accountDialog, SkuLookupDialog skuLookupDialog, StockRepository stockRepository, ILogger <MainDialog> logger) : base(nameof(MainDialog))
        {
            _luisRecognizer = luisRecognizer;
            Logger          = logger;
            _stockRepo      = stockRepository;

            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(bookingDialog);
            AddDialog(findStockDialog);
            AddDialog(accountDialog);
            AddDialog(hrDialog);
            AddDialog(skuLookupDialog);
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                IntroStepAsync,
                ActStepAsync,
                FinalStepAsync,
            }));

            // The initial child Dialog to run.
            InitialDialogId = nameof(WaterfallDialog);
        }
예제 #11
0
        // Dependency injection uses this constructor to instantiate MainDialog
        public MainDialog(FlightBookingRecognizer luisRecognizer, BookingDialog bookingDialog, ILogger <MainDialog> logger, IConfiguration configuration, MSVacationService mSVacationService)
            : base(nameof(MainDialog))
        {
            _mSVacationService = mSVacationService;
            _luisRecognizer    = luisRecognizer;
            Logger             = logger;

            AddDialog(new TextPrompt(nameof(TextPrompt)));
            //AddDialog(bookingDialog);
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                IntroStepAsync,
                //ActStepAsync,
                //FinalStepAsync,

                //PromptStepAsync,
                //LoginStepAsync,
                //AfterLogin,
                //AfterLoginCheck,
                LuisEchoStepAsync,
                FinalStepAsync,
            }));

            connectionName = configuration["ConnectionName"];

            AddDialog(new OAuthPrompt(
                          nameof(OAuthPrompt),
                          new OAuthPromptSettings
            {
                ConnectionName = connectionName,
                Text           = "Please Sign In",
                Title          = "Sign In",
                Timeout        = 300000, // User has 5 minutes to login (1000 * 60 * 5)
            }));

            // The initial child Dialog to run.
            InitialDialogId = nameof(WaterfallDialog);
        }
예제 #12
0
        // Dependency injection uses this constructor to instantiate MainDialog
        public MainDialog(IntentsRecognizer luisRecognizer, ActiveDirDialog activedirDialog, BookingDialog bookingDialog, SharepointDialog sharepointDialog, ILogger <MainDialog> logger)
            : base(nameof(MainDialog))
        {
            _luisRecognizer = luisRecognizer;
            Logger          = logger;

            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(bookingDialog);
            AddDialog(activedirDialog);
            AddDialog(sharepointDialog);
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                IntroStepAsync,
                ActStepAsync,
                FinalStepAsync,
            }));

            // The initial child Dialog to run.
            InitialDialogId = nameof(WaterfallDialog);
        }