One post tagged with "spring-ai"
View All TagsIn Part 2 you learned what tokens, the context window, temperature and embeddings are. Now you use a model from real Java code.
By the end you will have a Spring Boot app with one endpoint, /ask. You send it a question. It passes the question to a model and returns the answer. You will also log how many tokens each call used, and make the app fail politely when the model is down.
Plan for 30 to 40 minutes. You need Java 17 or newer, Maven, an editor, and either Ollama (a free tool that runs models on your own machine) or an account with a hosted model provider.