The following project leverages Generative AI (LLMs subset) with actor mentions using langchain4j as the main library
In order to start working with the project it needs some dependencies to be fulfilled
This project uses Java 21.
You can download PostgreSQL from their main page Official PostgreSQL Web however
we recommend to use Docker in order to run a small instance of PostgreSQL without the need of
software download.
Once Docker is installed run the following command
docker run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=<ANY_PASSWORD> -d postgres:<PG_VERSION>
- Replace ANY_PASSWORD with any password you'd like to use for the postgres user.
- Replace PG_VERSION with the PostgreSQL version you want to run, this is commonly known as tag in Docker
Click here to check all PostgreSQL tags PosgreSQL tags
Set the following Environment Variables
${POSTGRESQL_USERNAME}
${POSTGRESQL_PASSWORD}
The application connects to brandwatch to get mentions for a certain query through an API endpoint, you'd need to request
the following information and provide it to the application through Environment Variables
${BRANDWATCH_API_HOST}
${BRANDWATCH_API_USERNAME}
${BRANDWATCH_API_PASSWORD}
${BRANDWATCH_API_PROJECT_ID}
This application uses OPEN AI as the main Generative AI for classification and analysis for multiple mentions. We can certainly extend this functionality to use Different AI providers, please read the code carefully.
We need an OPEN AI API KEY to successfully connect to Open AI
${OPENAI_API_KEY}
For testing purposes we use Mailtrap to send emails for alerts, if you'd like to test this functionality you'd need to set the following Environment variables
${MAILTRAP_USERNAME}
${MAILTRAP_PASSWORD}
We need to set all environment variables before trying to run the project with the following command
./gradlew bootRun