public ChatBot(ILogger <ChatBot> logger, SalesDialogBotAccessors accessors, IOrderDialogSet salesDialogSet, INaturalLanguageEngine naturalLanguageEngine, IChatter chatter, ILanguageDialogSet languageDialogSet, IViewOrdersDialogSet viewOrdersDialogSet, ISpeechRecognizer speechRecognizer) { SpeechRecognizer = speechRecognizer; ViewOrdersDialogSet = viewOrdersDialogSet; LanguageDialogSet = languageDialogSet; Chatter = chatter; NaturalLanguageEngine = naturalLanguageEngine; Logger = logger; Accessors = accessors; SalesDialogSet = salesDialogSet; }
public AnotherProductDialog(SalesDialogBotAccessors accessors, IChatter chatter) { Chatter = chatter; Accessors = accessors; WaterfallSteps = new WaterfallStep[] { AnotherProductOrNotStepAsync, ThankYouStepAsync }; Prompts = new List <Dialog> { new ConfirmPrompt(AnotherProductPrompt), new ConfirmPrompt(ConfirmOrderPrompt) }; }
public LanguageDialog(SalesDialogBotAccessors accessors, ITextTranslator translator, IChatter chatter) { Chatter = chatter; Translator = translator; Accessors = accessors; WaterfallSteps = new WaterfallStep[] { LanguageChooseStepAsync, ToCustomerDialogStepAsync }; Prompts = new List <Dialog> { new ChoicePrompt(LanguagePrompt, LanguageValidatorAsync) }; }
public SalesOrderPostDialog(SalesDialogBotAccessors accessors, INavClient client, IChatter chatter) { Chatter = chatter; Client = client; Accessors = accessors; WaterfallSteps = new WaterfallStep[] { ConfirmSalesOrderStepAsync, PostSalesOrderAndViewStepAsync }; Prompts = new List <Dialog> { new ConfirmPrompt(ConfirmSalesOrderPrompt) }; }
public LanguageDialogSet(SalesDialogBotAccessors accessors, ILanguageDialog languageDialog, IChatter chatter) { Chatter = chatter; Accessors = accessors; languageSet = new DialogSet(accessors.LanguageDialogState); var prompts = new List <Dialog>(); prompts.AddRange(languageDialog.GetPrompts()); languageSet.Add(new WaterfallDialog(languageDialog.GetName(), languageDialog.GetWaterfallSteps())); foreach (var dialog in prompts) { languageSet.Add(dialog); } }
public VoiceVerificationDialog(SalesDialogBotAccessors accessors, IVoiceVerifier verifier, IChatter chatter) { VoiceVerifier = verifier; Chatter = chatter; Accessors = accessors; WaterfallSteps = new WaterfallStep[] { PhraseStepAsync, EndVoiceAsync }; Prompts = new List <Dialog> { new AttachmentPrompt(PhrasePrompt, VoiceValidatorAsync), new AttachmentPrompt(VoicePrompt, VoiceAuthenticatorAsync) }; }
public ViewOrdersDialog(SalesDialogBotAccessors accessors, INavClient client, IChatter chatter) { Chatter = chatter; Client = client; Accessors = accessors; WaterfallSteps = new WaterfallStep[] { ChooseOrderStepAsync, ChooseActionStepAsync, ToActionStepAsync, AnotherActionStepAsync }; Prompts = new List <Dialog> { new TextPrompt(OrdersPrompt, OrderNumberValidatorAsync), new ChoicePrompt(ActionPrompt), new ConfirmPrompt(OtherActionPrompt) }; }
public CustomerIdDialogWithVoiceRecognition(INavClient client, SalesDialogBotAccessors accessors, IChatter chatter) { Chatter = chatter; Client = client; Accessors = accessors; WaterfallSteps = new WaterfallStep[] { CustomerIdStepAsync, CustomerAuthenticationStepAsync, ConfirmProfileStepAsync, ToIntentionStepAsync }; Prompts = new List <Dialog> { new TextPrompt(CustomerIdPrompt, CustomerIdValidatorAsync), new ConfirmPrompt(ConfirmIdPrompt) }; }
public ProductDialog(SalesDialogBotAccessors accessors, INavClient client, IChatter chatter) { Chatter = chatter; Client = client; Accessors = accessors; WaterfallSteps = new WaterfallStep[] { ChooseItemCategoryStepAsync, ChooseItemStepAsync, ChooseQuantityStepAsync, ConfirmQuantityStepAsync, ToAnotherProductStepAsync }; Prompts = new List <Dialog> { new ChoicePrompt(ItemCategoryPrompt, ItemCategoryChoiceValidatorAsync), new ChoicePrompt(ProductPrompt, ProductChoiceValidatorAsync), new ConfirmPrompt(ConfirmQuantityPrompt), new NumberPrompt <int>(QuantityPrompt, QuantityChoiceValidatorAsync) }; }
public ViewOrdersDialogSet(SalesDialogBotAccessors accessors, IViewOrdersDialog viewOrdersDialog, ICustomerIdDialog customerIdDialog, IVoiceVerificationDialog voiceVerificationDialog, IChatter chatter) { Chatter = chatter; Accessors = accessors; viewOrdersSet = new DialogSet(accessors.ViewOrdersDialogState); var prompts = new List <Dialog>(); prompts.AddRange(viewOrdersDialog.GetPrompts()); prompts.AddRange(customerIdDialog.GetPrompts()); prompts.AddRange(voiceVerificationDialog.GetPrompts()); viewOrdersSet.Add(new WaterfallDialog(viewOrdersDialog.GetName(), viewOrdersDialog.GetWaterfallSteps())); viewOrdersSet.Add(new WaterfallDialog(voiceVerificationDialog.GetName(), voiceVerificationDialog.GetWaterfallSteps())); viewOrdersSet.Add(new WaterfallDialog(customerIdDialog.GetName(), customerIdDialog.GetWaterfallSteps())); foreach (var dialog in prompts) { viewOrdersSet.Add(dialog); } }
public CustomerIdDialog(INavClient client, SalesDialogBotAccessors accessors, IFaceRecognizer faceRecognizer, IChatter chatter) { Chatter = chatter; Client = client; Accessors = accessors; FaceRecognizer = faceRecognizer; WaterfallSteps = new WaterfallStep[] { CustomerIdStepAsync, CustomerAuthenticationStepAsync, ConfirmProfileStepAsync, ToIntentionStepAsync }; Prompts = new List <Dialog> { new TextPrompt(CustomerIdPrompt, CustomerIdValidatorAsync), new ConfirmPrompt(ConfirmIdPrompt), new AttachmentPrompt(VerifyByPicturePromt, AuthenticationValidatorAsync) }; }