Spring AI is an abstraction layer that helps you integrate LLMs (Large Language Models) like OpenAI, Azure OpenAI, Hugging Face, and more into your Spring Boot application.
The basic setup for Spring AI involves adding the Spring AI dependency, configuring the AI provider, and injecting and using the AI client in your code.
Additional features offered by Spring AI include prompt templates, RAG (Retriever-Augmented Generation) support, embedding & vector store support, and compatibility with LangChain4j.
Real-world use cases of Spring AI include AI search assistant for documentation, LLM-powered chatbot for support, text summarizer or document classifier, code generation assistant, and local inference with Ollama or Hugging Face models.