Sample project to start using the power of Langchain for Java!
Specially created for The Developer's Conference 2023 Future edition.
- Java 17
- Maven 3
- OpenAI account
- Create a copy of
.env.example
and rename to.env
- Fill the
.env
file with the OpenAI API token and organization ID - Export
.env
file to make env vars available:
export $(cat .env | xargs)
- Build the application from the source code:
./mvnw clean package
- Use the following commands to run each example:
./mvnw exec:java -D'exec.mainClass=_00_Model'
./mvnw exec:java -D'exec.mainClass=_01_Prompt'
./mvnw exec:java -D'exec.mainClass=_02_Memory'
./mvnw exec:java -D'exec.mainClass=_03_Retrieval'
./mvnw exec:java -D'exec.mainClass=_04_Agents'