Building the backend interface

Let us now try some code! We are now going to build a module in Java that can access the weather data from our data source in real time. We will then plug this module into the chatbot for the conversation manager to use:

  1. Open Eclipse.
  2. Create a new Maven project.
  3. Choose Create a simple project.
  4. Provide the location of the project and hit Next.
  5. On the next page, type Group Id, Artifact Id, Name, and Description. Click Finish.

We now have a blank Maven project ready.  Before we move on to developing the backend code, let's add a few dependency packages to our project. Find the POM file (pom.xml) and add the following Maven dependencies:

<dependencies> <!--https://mvnrepository.com/artifact/com.google.code.gson/gson--> ...

Get Hands-On Chatbots and Conversational UI Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.