Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NlpDispatchBot"/> class.
 /// </summary>
 /// <param name="services">Services configured from the ".bot" file.</param>
 public SysforeAIBotBot(IOptionsSnapshot <AppSettings> appSettings, IOptionsSnapshot <DialogFlow> dialogFlow, SysforeAIBotAccessors accessors)
 {
     _accessors   = accessors ?? throw new System.ArgumentNullException(nameof(accessors));
     _appSettings = appSettings.Value;
     _dialogFlow  = dialogFlow.Value;
     _services    = BotServiceHelper.InitBotServices(_appSettings);
 }
Ejemplo n.º 2
0
        public MainVM()
        {
            botHelper   = new BotServiceHelper();
            SendCommand = new Command(SendActivity);
            Messages    = new ObservableCollection <ChatMessage>();

            botHelper.MessageReceived += BotHelper_MessageReceived;
        }
Ejemplo n.º 3
0
        public ChatVM()
        {
            botHelper = new BotServiceHelper();

            SendCommand = new Command <string>(SendMessage, SendCanExecute);
            Messages    = new ObservableCollection <ChatMessage>();

            botHelper.MessageReceived += BotHelper_MessageReceived;
        }
Ejemplo n.º 4
0
        private async Task Init()
        {
            SendCommand       = new Command(async() => await Send());
            Messages          = new ObservableCollection <ChatMessage>();
            _botServiceHelper = new BotServiceHelper();
            await _botServiceHelper.CreateConversation();

            _botServiceHelper.MessageRecieved += _botServiceHelper_MessageRecieved;
        }