Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Chatterbot

 Chatterbot

I'm created the Kris. Kris is a Ruby IRC bot library.

https://github.com/Tomohiro/kris

Tomohiro Taira

December 04, 2012
Tweet

More Decks by Tomohiro Taira

Other Decks in Programming

Transcript

  1. Recent... 1. Became mayer of Ruby in coderwall.com 2. Got

    over 95 upvotes at protip in coderwall.com 3. AirPlayer in popularity (github, coderwall ...)
  2. Recent... 1. Became mayer of Ruby in coderwall.com 2. Got

    over 95 upvotes at protip in coderwall.com 3. AirPlayer in popularity (github, coderwall ...)
  3. Recent... 1. Became mayer of Ruby in coderwall.com 2. Got

    over 95 upvotes at protip in coderwall.com 3. AirPlayer in popularity (github, coderwall ...)
  4. Recent... 1. Became mayer of Ruby in coderwall.com 2. Got

    over 95 upvotes at protip in coderwall.com 3. AirPlayer in popularity (github, coderwall ...)
  5. Recent... 1. Became mayer of Ruby in coderwall.com 2. Got

    over 95 upvotes at protip in coderwall.com 3. AirPlayer in popularity (github, coderwall ...) current: 4th!!
  6. Chatterbot A chatter robot, chatterbot, chatbot, or chat bot is

    a computer program designed to simulate an intelligent conversation with one or more human users via auditory or textual methods, primarily for engaging in small talk. - via Wikipedia chatterbot
  7. Chatterbot on ... ɾChat system (IRC, Campfire, HipChat, and more...)

    ɾWeb Service (Twitter, Yammer, and more...) ɾIM (Skype, Google IM, and more...)
  8. Chatterbot on ... ɾChat system (IRC, Campfire, HipChat, and more...)

    ɾWeb Service (Twitter, Yammer, and more...) ɾIM (Skype, Google IM, and more...)
  9. Chatterbot on ... ɾChat system (IRC, Campfire, HipChat, and more...)

    ɾWeb Service (Twitter, Yammer, and more...) ɾIM (Skype, Google IM, and more...)
  10. Chatterbot on ... ɾChat system (IRC, Campfire, HipChat, and more...)

    ɾWeb Service (Twitter, Yammer, and more...) ɾIM (Skype, Google IM, and more...)
  11. kris example project /mybot/ |-- Gemfile ґଘؔ܎Λॻ͘ |-- bot Bot

    ىಈϓϩάϥϜ `-- plugin ϓϥάΠϯ༻σΟϨΫτϦ |-- foo.rb `-- bar.rb
  12. Bootstrap #!/usr/bin/env ruby require ‘kris’ Kris::Session.new( :server => ‘chat.freenode.net’, :port

    => 6667, :channel => ‘#MyChannel’, :username => ‘KrisBot’ ).start
  13. Plugin example # Hello ͱ͍͏ൃݴʹ Hello! ͱฦ౴͢Δྫ class Reply <

    Kris::Plugin def response(message) if message.body =~ /^Hello/ notice(message.to, ‘Hello!’) end end end
  14. ͓·͚ - Heroku Ͱ΋ಈ͘Αฤ $ cd my-bot $ echo ‘bot:

    bundle exec ruby bot’ > Procfile $ heroku create {my-bot-name} $ git commit -a -m ‘my bot on heroku’ $ git push heroku master $ heroku ps:scale bot=1