Пример #1
0
        public void ThinkIt(string s)
        {
            thoughargs ss = new thoughargs(s);

            ss.Text = s;
            Thread clientThread = new Thread(new ParameterizedThreadStart(on_think));

            clientThread.Start(ss);
        }
Пример #2
0
 public void on_think(object s)
 {
     if (s is thoughargs && bot1session != null)
     {
         thoughargs args = (thoughargs)s;
         string     ss   = bot1session.Think(args.Text);
         //Console.WriteLine(bot1session.Think(args.Text));
         this.Say("" + ss);
         //this.Say("[You Said: " + args.Text + "]");
     }
     else
     {
         factory     = new ChatterBotFactory();
         bot1        = factory.Create(ChatterBotType.CLEVERBOT);
         bot1session = bot1.CreateSession();
         this.Say("No.. no.. More lemon pledge...");
     }
 }