The primary repository for the book's examples is hosted on GitHub at habuma/spring-ai-in-action-examples .
<dependencies> <!-- Core Spring AI --> <dependency> <groupId>org.springframework.ai</groupId> <artifactId>spring-ai-core</artifactId> <version>1.0.0-M2</version> <!-- Check for latest version --> </dependency> <!-- OpenAI Starter (or use Ollama for local) --> <dependency> <groupId>org.springframework.ai</groupId> <artifactId>spring-ai-openai-spring-boot-starter</artifactId> <version>1.0.0-M2</version> </dependency> </dependencies>
private final ChatClient chatClient;
The PDF documentation details how to switch from OpenAiChatModel to OllamaChatModel with just an application.properties change.
If you cannot afford the Manning book, there is a massive open-source alternative. Search GitHub for: