Exemplo n.º 1
0
        public PartyDialog(ConversationRecognizer luisRecognizer, EndConversationDialog endConversationDialog, ILogger <PartyDialog> logger)
            : base(nameof(PartyDialog))
        {
            _luisRecognizer = luisRecognizer;
            Logger          = logger;

            AddDialog(endConversationDialog);
            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(new ConfirmPrompt(nameof(ConfirmPrompt)));
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                AskParty,               // Ask for user input
                ElaboratePartyAsync,    // Make a remark on input
                ContinueStepAsync,      // Continue to next dialog
            }));

            // The initial child Dialog to run.
            InitialDialogId = nameof(WaterfallDialog);
        }
Exemplo n.º 2
0
        // Initialise the dialog

        public UserProfileDialog(ConversationRecognizer luisRecognizer, ILogger <UserProfileDialog> logger, EndConversationDialog endConversationDialog, ModuleDialog moduleDialog)
            : base(nameof(UserProfileDialog))
        {
            _luisRecognizer = luisRecognizer;
            Logger          = logger;

            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(endConversationDialog);
            AddDialog(moduleDialog);
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                IntroStepAsync,
                GetNameAsync,
            }));

            // The initial child Dialog to run.
            InitialDialogId = nameof(WaterfallDialog);
        }
Exemplo n.º 3
0
        public ModuleDialog(ConversationRecognizer luisRecognizer, ILogger <ModuleDialog> logger, LecturerDialog lecturerDialog, ExtracurricularDialog extracurricularDialog, EndConversationDialog endConversationDialog, CampusDialog campusDialog)
            : base(nameof(ModuleDialog))

        {
            _luisRecognizer = luisRecognizer;
            Logger          = logger;
            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(lecturerDialog);
            AddDialog(extracurricularDialog);
            AddDialog(endConversationDialog);

            AddDialog(campusDialog);
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                IntroStepAsync,
                NumberModulesStepAsync,
                FavModuleAsync,
                ExamorCaFavAsync,
                OpinionFavAsync,
                LeastFavModuleAsync,
                ExamorCaLeastAsync,
                OpinionLeastAsync,
            }));

            // The initial child Dialog to run.
            InitialDialogId = nameof(WaterfallDialog);
        }
Exemplo n.º 4
0
        //  Lecturer Dialog Class
        public LecturerDialog(ConversationRecognizer luisRecognizer, ILogger <LecturerDialog> logger, MainDialog mainDialog, EndConversationDialog endConversationDialog, ExtracurricularDialog extracurricularDialog)
            : base(nameof(LecturerDialog))

        {
            _luisRecognizer = luisRecognizer;
            Logger          = logger;
            // Dialog flow
            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(endConversationDialog);
            AddDialog(extracurricularDialog);
            AddDialog(mainDialog);
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), new WaterfallStep[]
            {
                IntroStepAsync,
                GetInfoAsync,
                infoAsync,
                GetAnswerAsync,
            }));
            // The initial child Dialog to run.
            InitialDialogId = nameof(WaterfallDialog);
        }