Ejemplo n.º 1
0
        public string Answer(string message, Chatbot bot)
        {
            Request r   = new Request(message, bot.BotUser, BotEngine);
            Result  res = BotEngine.Chat(r);

            return(res.Output.Length == 0?"I can't understand":res.Output);
        }
Ejemplo n.º 2
0
        public string Answer(string message, Visitor v)
        {
            Request r   = new Request(message, GetVisitor(v), BotEngine);
            Result  res = BotEngine.Chat(r);

            res.user.SaveSettings(Path.Combine(UsersPath, v.VisitorIdentifier + ".xml"));
            return(res.Output.Length == 0?"I can't understand":res.Output);
        }