This project uses Quarkus to create a summarizer REST service for test and files. It uses Ollama (llama3.1) LLM in order to do the task.
You can run your application in dev mode that enables live coding using:
./mvnw compile quarkus:devNOTE: Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.
Once the application is running then you can send rest calls like these ones:
http POST http://localhost:8080/summarize/text text="Esto es un test" language="english"Previous to the next one, just create a file ("file.txt") and put some text on it to translate.
http -f POST http://localhost:8080/summarize/file input@file.txt- LangChain4j Ollama (guide): Provides the basic integration of Ollama with LangChain4j
Easily start your RESTful Web Services