Spring AI Custom CallAdvisor & StreamAdvisor Example
Spring AI CallAdvisor and StreamAdvisor provide hooks to wrap around LLM invocations, both for synchronous and streaming scenarios.
Spring AI CallAdvisor and StreamAdvisor provide hooks to wrap around LLM invocations, both for synchronous and streaming scenarios.
Spring AI tool calling with Ollama: describe Java methods with @Tool, pass them to ChatClient, and handle errors, loops and tools that change data safely.
Learn to download, install, and run an LLM model using Ollama. Also learn to configure Spring AI Ollama module to access the model’s chat API.
Spring AI tutorial: a learning path of articles in reading order, from the first ChatClient call to RAG, tools, agents, testing and other model providers.
Spring AI text to SQL: turn a question into a SELECT with a ChatClient, check it, run it read-only, explain the rows and fix the model’s common SQL errors.
For creating an ETL pipeline for Spring AI data ingestion microservice, Spring cloud functions are an excellent choice for serverless providers.
Spring AI ETL pipeline example: read Markdown and PDF files, add metadata, split with TokenTextSplitter and load a vector store without duplicates.
Spring AI vector store example: load documents into SimpleVectorStore, search by meaning with filters, then move the same code to ChromaDB in Docker.
Spring AI embedding model example with Ollama: turn text into a 768-number vector and compare a question with policy sentences by cosine similarity.
Spring AI speech to text with OpenAI whisper-1: TranscriptionModel, language and prompt options, a voice-note endpoint, and answering it with ChatClient.
Spring AI text to speech with OpenAI: TextToSpeechModel, voices, speed and tone per request, streaming audio, and the traps of length and cost.
Spring AI structured output examples: entity() for records, lists and maps, native JSON schema output with Ollama, and the validation advisor.
Spring AI image generation with ImageModel and OpenAI gpt-image-1-mini: ImagePrompt, size and quality options, Base64 output and a banner endpoint.
Spring AI getting started guide: install Ollama, create a Spring Boot 4 project, write a ChatClient endpoint, run it locally and fix the common errors.
HowToDoInJava provides tutorials and how-to guides on Java and related technologies.
It also shares the best practices, algorithms & solutions and frequently asked interview questions.