Skip to content

Gemini workshop for Java developers, using the LangChain4j orchestration framework

License

Notifications You must be signed in to change notification settings

ttmottt/gemini-workshop-for-java-developers

 
 

Repository files navigation

Gemini Workshop

Welcome to the Gemini workshop for Java developers, using the LangChain4j LLM orchestration framework.

This workshop is geared towards Java developers, to discover the Gemini Large Language Model created by Google. We will explore the model through the use of LangChain4j to interact with the LLM.

The steps and instructions in this workshop are detailed in the Gemini for Java Developers codelab.

List of the samples

In this workshop, you will be able to go through the following examples:

Running the examples

Before running the examples, you'll need to set up two environment variables:

export PROJECT_ID=YOUR_PROJECT_ID
export LOCATION=us-central1

Warning

Be sure to update the project ID and location to match your project.

Use the Gradle wrapper to run the examples:

./gradlew run -DjavaMainClass=gemini.workshop.QA
./gradlew run -DjavaMainClass=gemini.workshop.StreamQA
./gradlew run -DjavaMainClass=gemini.workshop.Conversation
./gradlew run -DjavaMainClass=gemini.workshop.Multimodal
./gradlew run -DjavaMainClass=gemini.workshop.ExtractData
./gradlew run -DjavaMainClass=gemini.workshop.PromptTemplate
./gradlew run -DjavaMainClass=gemini.workshop.TextClassification
./gradlew run -DjavaMainClass=gemini.workshop.RAG
./gradlew run -DjavaMainClass=gemini.workshop.FunctionCalling

Prerequisites

The code examples have been tested on the following environment:

  • Java 21
  • Gradle 8.6

In order to run these examples, you need to have a Google Cloud account and project ready.


This is not an official Google product.

About

Gemini workshop for Java developers, using the LangChain4j orchestration framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%