Example #1
0
        public string SendMessage(string username, string message)
        {
            var userMessage = new TextLine(username, message);
            var lastMessage = sessionService.CurrentSessionMessagesHistory.LastOrDefault();
            var botReaction = conversationService.GetBotResponse(userMessage, sessionService.FullSessionMessagesHistory, lastMessage);

            sessionService.AddBotMessage(botReaction);

            return(botReaction.RobotMessage.Message);
        }