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

Let’s have some fun with chat bots! @ JavaCro 2018

Let’s have some fun with chat bots! @ JavaCro 2018

A lot of companies are investing in chat bots. In this workshop, we will develop a fully functional chat bot from scratch with support for formatted messages, photos, documents, locations, buttons, custom keyboards and more. No slides, just code – and a lot of fun…

Do you understand the user interface of every website and every application? I don’t! Do you understand how to use a chat application like WhatsApp, Telegram, Threema, Signal, Facebook Messenger, etc? I do! If everyone knows how to chat, what if we provide our business services using a chat bot as a user interface? Let’s have some fun and create a chat bot live on stage as an introduction to this very interesting topic!

This talk has no slides – it’s all about code! Live on stage I start a new empty project and show the audience how to write a complete and working chat bot from scratch for Telegram. Our bot will receive messages from other Telegram users, analyze them and send an appropriate answer. The messages can be formatted and contain photos, documents and locations. We will use custom and inline keyboards, callback buttons and much more.

This talk is kind of interactive – the audience can use a Telegram client on their own devices to talk to the chat bot while I’m working on it live on stage.

To fully understand this talk the attendees should have basic knowledge of Java.

Marcus Fihlon

May 08, 2018
Tweet

More Decks by Marcus Fihlon

Other Decks in Technology

Transcript

  1. Chatbot Workshop
    Let's have some fun with chatbots!
    Marcus Fihlon
    @McPringle
    May 8, 2018
    Rovinj

    View full-size slide

  2. @McPringle
    Disclaimer
    The following presentation has been approved for open audiences only. Hypersensitivity to occasional
    profanity requires covering ears.
    All logos, photos etc. used in this presentation are the property of their respective copyright owners and
    are used here for educational purposes only. Any and all marks used throughout this presentation are
    trademarks of their respective owners.
    The presenter is not acting on behalf of CSS Insurance, neither as an official agent nor representative. The
    views expressed are those solely of the presenter.
    Marcus Fihlon disclaims all responsibility for any loss or damage which any person may suffer from reliance
    on this information or any opinion, conclusion or recommendation in this presentation whether the loss or
    damage is caused by any fault or negligence on the part of presenter or otherwise.

    View full-size slide

  3. Introduction

    View full-size slide

  4. @McPringle
    About me
    ● Software Engineer
    CSS Insurance, Open Source Software
    ● Agile Coach
    CSS Insurance
    ● Lecturer
    TEKO Swiss Technical College
    ● Speaker
    Conferences, User Groups, Meetups
    ● Author
    Articles, Books
    ● Community Leader
    Hackergarten, Java User Group Switzerland, Kotlin Swiss User Group,
    Voxxed Days Zürich, BaselOne

    View full-size slide

  5. @McPringle
    Coming soon*
    Kotlin Web Development
    Develop full stack web applications with Kotlin and React.js
    Packt Publishing
    ISBN 978-1-78862-031-4
    * around Q3/2018

    View full-size slide

  6. @McPringle
    What makes chatbots unique?
    Chatbots…
    ● are super easy to use.
    ● have a personality and can be sympathetic.
    ● don't just give answers, they perform actions.
    ● can actively resume calls.
    ● can be achieved with a relatively small budget.
    ● can be active on multiple platforms.
    ● provide the best insights into the user's emotional state.

    View full-size slide

  7. @McPringle
    Examples
    Use a chatbot to…
    ● play a game or discuss your mental problems.
    ● order something to eat or reserve a table.
    ● create and remove virtual machines without calling a system administrator.
    ● log your work data and monitor your overtime and vacation days.
    ● handle frequently asked questions to reduce your call center load.
    ● monitor your infrastructure and inform relevant people of outages.
    ● communicate with your customers "in real time", e.g. ask for missing documents.

    View full-size slide

  8. @McPringle
    Chatbot Platforms
    And many more!

    View full-size slide

  9. @McPringle
    Today
    What you're gonna learn today:
    ● The technical base
    ● Receiving and sending messages
    ● Receiving and sending photos
    ● Using own keyboards (buttons)
    ● Formatting messages
    ● Writing automated tests
    What you won't learn today:
    ● Natural Language Processing (NLP)
    ● Artificial Intelligence (AI)

    View full-size slide

  10. @McPringle
    Credits
    This workshop relies heavily on the
    Java Telegram API hosted on GitHub:
    https://github.com/rubenlagus/TelegramBots
    Thank God they have such a great Wiki!

    View full-size slide

  11. @McPringle
    Prerequisites
    You need…
    ● Java 8 installed and ready to use on your computer
    ● An IDE you are familiar with
    ● A Telegram account (tip: use your mobile phone to create one)
    ● A Telegram client (mobile, web or desktop app)
    ● Internet access
    ● Enough battery power for the workshop (or a power cable)

    View full-size slide

  12. Workshop Time!
    https://github.com/chatbot-workshop/java-telegram-workshop

    View full-size slide

  13. @McPringle
    You ever dreamed of living in Switzerland?

    View full-size slide

  14. @McPringle
    Code Warriors wanted!
    About you
    ● You are frighteningly awesome at what you do.
    ● You can perform quick and deadly tactical
    strikes, as well as feats of epic badassery.
    Sometimes both at the same time.
    ● You would rather refactor existing, mostly
    working, ugly code instead of rewriting it from
    scratch. OK nobody would really rather do that,
    but you know it's the right and honorable thing
    to do most of the time.
    ● You know where your towel is.
    About us
    ● Biggest Basic Health Insurance Company
    ● 2700 Employees
    ● 300 IT Professionals
    ● 24 Scrum Teams
    ● 130 Software Developers
    ● Flexible working times
    ● Personal development support
    ● 6 weeks paid vacation
    ● Great benefits
    ● Located in Lucerne, Switzerland
    Contact me: [email protected]

    View full-size slide

  15. @McPringle
    https://fihlon.ch/javacro18

    View full-size slide