Table of Contents

This book is loaded with tons of examples to allow you to quickly get up and running with ChatGPT and OpenAI APIs in your Java applications.

  • Chapter 1:

    Introducing ChatGPT for Java Developers

    Learn about the terminology necessary to get started from scratch. Get introduced to the models available for developers and learn how to use the Chat Playground. Learn the differences in the models available in order to build AI-enabled apps with Java.


  • Chapter 2:

    Using ChatGPT as Your Java Pair-Programmer

    Due to the fact that there is no official ChatGPT API for Java, you'll see the steps necessary to create a lightweight API for yourself. Create your first ChatGPT client app with a single class and few dependencies.


  • Chapter 3:

    Using AI in the Enterprise! Creating a Text Summarizer for Slack Messages

    You've heard about the term, "prompt engineering", but does it actually mean? In this chapter, we'll learn the basics of promp engineering to create a text summarizer bot for Slack all in Java.


'ChatGPT for Java' book cover, free book, by Bruce Hopkins
  • Chapter 4:

    Multimodal AI - Creating a Podcast Visualizer with Whisper and DALL·E 3

    Aren't you cutious sometimes about what is being discussed in a compelling podcast episode? In this chapter, you'll learn all the steps necessary to create a Podcast Visualizer using the Whisper (speech to text) and DALL·E 3 models.

  • Chapter 5:

    Creating an Automated Community Manager Bot with Discord and Java

    Discord is a popular tool for community management, however healthy online communities don't create themselves. In this chapter we'll create basic Discord bots for Q&A and for content moderation.

  • Chapters 6 & 7:

    Adding Intelligence to our Discord Bots

    We take the basic Discord bots created in the previous chapter and make them intelligent. We use proper prompt engineering to make the Q&A bot automaticaly answer questions from an externally loaded knowledge base. We also make our content moderator bot delete unwanted messages in the Discord server.

Bruce Hopkins is located in Barcelona, Spain. He is the author of ChatGPT for Java