50 lines
No EOL
2.4 KiB
Markdown
50 lines
No EOL
2.4 KiB
Markdown
kvant AI Model as a Service & LangChain4j
|
|
===============================================
|
|
|
|
This demos helps you get started with the integration of AI in Java based applications using Quarkus and LangChain4j.
|
|
Java is a widely used language established over the last 2 decades. There are a huge number of applications developed
|
|
using Java, including many deployed in enterprise environments. This makes it appropriate to approach AI from
|
|
the Java world.
|
|
|
|
# Goals
|
|
You are going to play (and hopefully enjoy) with:
|
|
* How to integrate LLMs (Language Models) in your Java application
|
|
* How to build a chatbot using LangChain4j
|
|
* How to configure and how to pass prompts to the LLM
|
|
* How to build agentic systems
|
|
* How to build simple and advanced RAG (Retrieval-Augmented Generation) patterns
|
|
* How to deal with prompt injection: Guardrails
|
|
* How to look in the room-machine: Observability
|
|
|
|
# Requirements
|
|
* Acquire kvant AI Model as a Service tokens. You can start with the FREE plans!!! - https://console.kvant.cloud/en/products/categories/CLOUD_MAAS
|
|
* Java SDK (version 21.x.x, recommend GraalVM CE) - https://www.graalvm.org/downloads/#
|
|
* Apache Maven JDK (version >= 3.9.x) - https://maven.apache.org/download.cgi
|
|
* Git (version >= 2.34.x) - https://git-scm.com/downloads
|
|
* Docker Desktop - https://www.docker.com/products/docker-desktop/ (version >= 4.35.x)
|
|
* LLM Access tokens - They will be provided during the workshop
|
|
* (Recommended) IntelliJ IDEA - https://www.jetbrains.com/idea/download/ (version >= 2024.2.5)
|
|
|
|
|
|
# Run demos
|
|
1) Clone the `ai-lc4j-workshop` repository - https://git.kvant.cloud/phoenix/ai-lc4j-demos
|
|
2) Move to your `ai-lc4j-workshop` folder
|
|
3) Move to the corresponding `demo-0x` folder
|
|
4) Execute `mvn clean quarkus:dev`
|
|
5) Open your internet browser a point to `http:\\localhost:8080`
|
|
|
|
**WARNING:** Be sure your Docker environment is running
|
|
|
|
|
|
# Credits
|
|
These demos are based on the existing LangChain4j examples and workshops. They have been adapted to use
|
|
Phoenix Technologies AG's kvant AI cloud platform and LLM's hosted on it.
|
|
|
|
# Resources
|
|
* Phoenix Technologies AG - https://phoenix-technologies.ch/en
|
|
* Kvant AI Cloud - https://kvant.cloud/en/products/kvant-ai/ai-concierge
|
|
* LangChain - https://www.langchain.com/
|
|
* LangChain4j - https://docs.langchain4j.dev/intro/
|
|
* LangChain4j Tutorials - https://docs.langchain4j.dev/category/tutorials
|
|
* Quarkus LangChain4j - https://docs.quarkiverse.io/quarkus-langchain4j/dev/index.html
|
|
* Quarkus - https://quarkus.io/ |