This repository contains an example Java-only application that enables AI-powered chat interactions with PDF documents. Upload and process PDF documents. Ask questions about the document.
- Apache Tika to parse the PDF
- Spring AI for call Local LLM or Open AI API
- Vaadin 24.6 Web UI in Java
Project was created from start.spring.io
- Java 21
- Maven
Clone the repository:
git clone https://github.com/samie/pdf-chat.git
cd pdf-chatBefore running you need OpenAI API key or local LLM service running.
Set either OPENAI_API_KEY or edit the LLM url in application.properties.
Build and run the project:
mvn spring-boot:runor if you don't have Maven installed:
./mvnw spring-boot:runOnce running, access the application at:
[http://localhost:8080](http://localhost:8080)
This project is licensed under the Apache 2.0 License.
Special thanks to London Java User Group for the inspiration behind this project.