private ChatterBotSession CreateSession(ChatterBotType type) { if (!bots.ContainsKey(type)) bots.Add(type, factory.Create(type, "d689f7b8de347251")); return bots[type].CreateSession(); }
public static ChatterBot Create(ChatterBotType type, object arg) { #if GLOBAL_NADEKO var url = "http://www.cleverbot.com/webservicemin?uc=777&botapi=nadekobot"; #else var url = "http://www.cleverbot.com/webservicemin?uc=777&botapi=chatterbotapi"; #endif switch (type) { case ChatterBotType.CLEVERBOT: return(new Cleverbot("http://www.cleverbot.com/", url, 26)); case ChatterBotType.JABBERWACKY: return(new Cleverbot("http://jabberwacky.com", "http://jabberwacky.com/webservicemin", 20)); case ChatterBotType.PANDORABOTS: if (arg == null) { throw new ArgumentException("PANDORABOTS needs a botid arg", nameof(arg)); } return(new Pandorabots(arg.ToString())); } return(null); }
public ChatterBot Create(ChatterBotType type, object arg) { switch (type) { case ChatterBotType.CLEVERBOT: return(new Cleverbot("http://cleverbot.com/webservicemin")); } return(null); }
private void ChangeBot(string user, ChatterBotType type) { user = user.ToLower(); if (!conversations.ContainsKey(user)) conversations.Add(user, new ConversationState(this, type)); else conversations[user] = new ConversationState(this, type); }
public ChatterBot Create(ChatterBotType type, object arg) { switch (type) { case ChatterBotType.CLEVERBOT: return new Cleverbot("http://www.cleverbot.com/webservicemin", 26); case ChatterBotType.JABBERWACKY: return new Cleverbot("http://jabberwacky.com/webservicemin", 20); case ChatterBotType.PANDORABOTS: if (arg == null) throw new ApplicationException("PANDORABOTS needs a botid arg"); return new Pandorabots(arg.ToString()); } return null; }
public static ChatterBot Create(ChatterBotType type, object arg) { switch (type) { case ChatterBotType.CLEVERBOT: return(new Cleverbot("http://www.cleverbot.com/", "http://www.cleverbot.com/webservicemin?uc=321", 26)); case ChatterBotType.JABBERWACKY: return(new Cleverbot("http://jabberwacky.com", "http://jabberwacky.com/webservicemin", 20)); case ChatterBotType.PANDORABOTS: if (arg == null) { throw new ArgumentException("PANDORABOTS needs a botid arg", nameof(arg)); } return(new Pandorabots(arg.ToString())); } return(null); }
private bool TryConvert(string name, out ChatterBotType type) { name = name.ToLower(); if (name == "clever" || name == "cleverbot") { type = ChatterBotType.CLEVERBOT; return true; } if (name == "pandora" || name == "pandorabot" || name == "pandorabots") { type = ChatterBotType.PANDORABOTS; return true; } type = ChatterBotType.CLEVERBOT; return false; }
public IChatterBot Create(ChatterBotType type, object arg) { switch (type) { case ChatterBotType.Cleverbot: return(new Cleverbot("http://www.cleverbot.com/webservicemin", 26)); case ChatterBotType.Jabberwacky: return(new Cleverbot("http://jabberwacky.com/webservicemin", 20)); case ChatterBotType.Pandorabots: if (arg == null) { throw new ApplicationException("PANDORABOTS needs a botid arg"); } return(new Pandorabots(arg.ToString())); } return(null); }
public ChatterBot Create(ChatterBotType type, object arg) { switch (type) { case ChatterBotType.CLEVERBOT: return new Cleverbot("http://cleverbot.com/webservicemin"); case ChatterBotType.JABBERWACKY: return new Cleverbot("http://jabberwacky.com/webservicemin"); } return null; }
public ChatterBot Create(ChatterBotType type) { return Create(type, null); }
public static ChatterBot Create(ChatterBotType type) { return(Create(type, null)); }
static ChatterBotSession CreateBotSession(ChatterBotType type) => new ChatterBotFactory().Create(type).CreateSession();
public ConversationState(Chatbot bot, ChatterBotType type) { botType = type; session = bot.CreateSession(type); this.bot = bot; }