- Java JDK 21 or later
- Maven
- Docker — optional. The Testcontainers-based
cache/RestRedisTeststarts aredis:latestcontainer to exercise the REST Redis cache. Without a running Docker daemon that test class is skipped automatically (@Testcontainers(disabledWithoutDocker = true)) and the build still succeeds; you simply do not get REST Redis coverage. - API keys for the language model platforms you plan to use, configured either as environment variables or in a
.envfile (see Credentials below):- OpenAI:
OPENAI_ORGANIZATION_IDandOPENAI_API_KEY - Open WebUI:
OPENWEBUI_URLandOPENWEBUI_API_KEY - Blablador:
BLABLADOR_API_KEY - DeepSeek:
DEEPSEEK_API_KEY - Ollama (chat):
OLLAMA_HOST(required),OLLAMA_USER,OLLAMA_PASSWORD(optional) - Ollama (embeddings):
OLLAMA_EMBEDDING_HOST(required),OLLAMA_EMBEDDING_USER,OLLAMA_EMBEDDING_PASSWORD(optional)
- OpenAI:
Copy the tracked env-template to .env and fill in the keys you need, or export them as process environment variables:
cp env-template .envTwo things are easy to get wrong here:
- The
.envfile is read from the current working directory — the directory you run LiSSA from, which is not necessarily the repository root. - The process environment takes precedence over
.env. A key in.envis used only when that variable is not already exported, so an exportedOPENAI_API_KEYsilently overrides the one in your.env.
OPENAI_ORGANIZATION_ID and OPENAI_API_KEY must be set even for a run that is served entirely from the cache: the OpenAI embedding creator and chat model provider both validate them at construction time, before any cache is consulted. Dummy values are sufficient and open no connection — this is what src/test/resources/.env-test does for the offline end-to-end test.
mvn clean packageThis works with or without Docker — see the note on RestRedisTest under Prerequisites.
mvn testOn a machine without Docker, RestRedisTest reports its tests as skipped and the rest of the suite runs normally. To get REST Redis coverage, start a Docker daemon before running the tests.
mvn verifyverify additionally runs spotless:check, which is what CI enforces.
Important
Spotless is configured with <ratchetFrom>origin/main</ratchetFrom>, so it resolves that ref through JGit. mvn verify therefore needs a git clone whose origin/main remote-tracking ref has been fetched. Building from an unpacked source archive requires -Dspotless.check.skip=true.
- Fork the repository
- Create a feature branch
- Make your changes
- Run
mvn spotless:apply - Submit a pull request
Run mvn spotless:apply before committing — mvn verify runs spotless:check and CI fails otherwise. Spotless covers:
- Java sources: palantir-java-format in
PALANTIRstyle, import order fromspotless.importorder, and a mandatory license header fromheader.txt. - Markdown:
README.mdanddocs/**/*.mdare formatted with flexmark, so documentation changes are format-checked too.
Please ensure your code follows the project's coding standards and includes appropriate tests.
- If you encounter cache-related issues, try clearing the cache directory
- For API-related errors, verify your API key configuration for the platform you're using:
- OpenAI: Check
OPENAI_ORGANIZATION_IDandOPENAI_API_KEY - Open WebUI: Check
OPENWEBUI_URLandOPENWEBUI_API_KEY - Blablador: Check
BLABLADOR_API_KEY - DeepSeek: Check
DEEPSEEK_API_KEY - Ollama (chat): Check
OLLAMA_HOST(required),OLLAMA_USER,OLLAMA_PASSWORD(optional) - Ollama (embeddings): Check
OLLAMA_EMBEDDING_HOST(required),OLLAMA_EMBEDDING_USER,OLLAMA_EMBEDDING_PASSWORD(optional)
- OpenAI: Check
- If a variable looks set in
.envbut LiSSA uses a different value, check whether it is also exported in your shell — the process environment wins (unset <VAR>to fall back to.env) - If
RestRedisTestis reported as skipped, Docker is not available — start the Docker daemon to run it - Check the console output for detailed error messages