❯ Guillaume Laforge

Gemini codelab for Java developers using LangChain4j

No need to be a Python developer to do Generative AI! If you’re a Java developer, you can take advantage of LangChain4j to implement some advanced LLM integrations in your Java applications. And if you’re interested in using Gemini, one of the best models available, I invite you to have a look at the following “codelab” that I worked on:

Codelab — Gemini for Java Developers using LangChain4j

In this workshop, you’ll find various examples covering the following use cases, in crescendo approach:

  • Making your fist call to Gemini (streaming & non-streaming)
  • Maintaining a conversation
  • Taking advantage of multimodality by analysing images with your prompts
  • Extracting structured information from unstructured text
  • Using prompt templates
  • Doing text classification with few-shot prompting
  • Implementing Retrieval Augmented Generation to chat with your documentation
  • How to do Function Calling to expand the LLM to interact with external APIs and services

You’ll find all the code samples on Github.

If you’re attending Devoxx France, be sure to attend the Hands-on-Lab workshop with my colleagues Mete Atamel and Valentin Deleplace who will guide you through this codelab.