This repository supports the session "Experimenting with Integrating Large Language Models into Domino Apps" at Engage 2024.
You can see the slide deck here. Please note that some of the code requires the project database from OpenNTF, which is not publicly available. However, you can still use this database as a reference and modify the code to utilize your own data. We also employ the LocalModels
class from the Domino-LangChain4j project.
This module contains common functionalities used across the demos:
- ConfigGateway.java: A simple gateway to read configuration files.
- ProjectsGateway.java: Creates a collection of text segments from the OpenNTF project database.
- QDrantUploader.java: An example class that receives projects, creates embeddings, and uploads them to the QDrant database.
This module contains the runnable applications of the demo:
- AbstractStandaloneApp.java: A reusable class that facilitates running applications with
dominoClient
connectivity. It also loads the.env
file from your home directory for keys and other configuration variables. - FewShotsDemo.java and PromptsDemo.java: Examples of simple prompt-based AI services using
langchain4j
. - Upload2QDrantDemo.java: A standalone application that uploads project embeddings to the Qdrant database. Utilizes
QDrantUploader
fromlangchain4j-demos-commons
.
This module includes an experimental Java addin intended to run on the server. Currently, it does not function as expected due to a class dependency issue on the Domino server.
The ODP project for the demo NSF. You can see how langchain4j is implemented in java classes in com.developi.llm package.
Upload2QDrantDemo.java accesses a local instance of the QDrant. Easiest way to run QDrant on your environment is Docker (or podman):
docker run -p 6333:6333 -p 6334:6334 \
-v $(pwd)/qdrant_storage:/qdrant/storage:z \
qdrant/qdrant
This will launch a QDrant instance without any security.
Feel free to play with it. Currently, it needs designer and server plugins from the Domino-LangChain4j project and also a Vector store prepared in the Qdrant server. Semantic search will look for embedding config documents for local and cloud model examples. Fulltext search will need the OpenNTF project database which is not publicly available.
You may define OpenAI Api key in xsp.properties file (in the database or in the server).