LoudPacks Posted November 5, 2016 Share Posted November 5, 2016 (edited) Library jar: http://www.mediafire.com/file/i5c5fkni41m78d9/ChatterBotLib.jar Snippet: ChatterBotFactory factory = new ChatterBotFactory(); ChatterBot bot = factory.create(ChatterBotType.CLEVERBOT); ChatterBotSession botSession = bot.createSession(); String response = botSession.think("Text you want to respond to."); System.out.println(response); Sample: Now if you want it for your scripts just put it into the onMessage maybe with some conditions about when it should respond / who it should respond to, etc. I would run it on a separate thread incase the response takes a little while to complete. Edited November 5, 2016 by LoudPacks 8 Quote Link to comment Share on other sites More sharing options...
Aiban Posted November 5, 2016 Share Posted November 5, 2016 (edited) You are a God Edit:: The bot is Edited November 5, 2016 by Aiban Quote Link to comment Share on other sites More sharing options...
Saiyan Posted November 5, 2016 Share Posted November 5, 2016 Fuck yes Quote Link to comment Share on other sites More sharing options...
memer boi 772 Posted November 5, 2016 Share Posted November 5, 2016 You are a God Quote Link to comment Share on other sites More sharing options...
House Posted November 5, 2016 Share Posted November 5, 2016 (edited) Might want put it into a separate thread though? Pretty sure response times are a little while EDIT: also its done before but turned out as a bad idea im pretty sure xD Edited November 5, 2016 by House Quote Link to comment Share on other sites More sharing options...
LoudPacks Posted November 5, 2016 Author Share Posted November 5, 2016 Might want put it into a separate thread though? Pretty sure response times are a little while EDIT: also its done before but turned out as a bad idea im pretty sure xD Yes that would be a good idea, usually its instant but sometimes it can take a few seconds. Quote Link to comment Share on other sites More sharing options...
Token Posted November 5, 2016 Share Posted November 5, 2016 Responses are not instant, I'm using the same API as you. CleverBot generates a limited set of responses for every message you give. I use a recursive algorithm with a variable depth to ensure a larger pool of messages. You should query CleverBot on a separate thread using a Callable<String> to provide a Future<String> for when the processing is done. Quote Link to comment Share on other sites More sharing options...
LoudPacks Posted November 5, 2016 Author Share Posted November 5, 2016 (edited) Responses are not instant, I'm using the same API as you. CleverBot generates a limited set of responses for every message you give. I use a recursive algorithm with a variable depth to ensure a larger pool of messages. You should query CleverBot on a separate thread using a Callable<String> to provide a Future<String> for when the processing is done. I mean I set up 2 bots talking to each other and response times were ~<= 1s apart (every so often it would take a couple seconds). It would still be a good idea though none the less. I would assume users would only be sending one message at a time. Edited November 5, 2016 by LoudPacks Quote Link to comment Share on other sites More sharing options...
xOx Posted November 5, 2016 Share Posted November 5, 2016 Welcome to project Prometeus. Quote Link to comment Share on other sites More sharing options...
Eagle Scripts Posted November 6, 2016 Share Posted November 6, 2016 Noice Quote Link to comment Share on other sites More sharing options...
Juggles Posted November 7, 2016 Share Posted November 7, 2016 Good stuff Quote Link to comment Share on other sites More sharing options...