Home

Awesome

Concerto for Java and AI

Slides

Stack

Mousike

First, make sure you have an OpenAI account. Then, define an environment variable with the OpenAI API Key associated to your OpenAI account as the value.

export SPRING_AI_OPENAI_API_KEY=<INSERT KEY HERE>

Finally, run the Spring Boot application.

cd mousike
./gradlew bootTestRun

You can access the application at http://localhost:8080.

The application relies on the native Testcontainers support in Spring Boot to spin up a PostgreSQL database with the pgvector extension, and a Grafana LGTM service for observability.

Grafana is listening to port 3000. Check your container runtime to find the port to which is exposed to your localhost and access Grafana from http://localhost:<port>. The credentials are admin/admin.