Part 2: Spring AI Chat Completions with OpenAI or Ollama

Part 2: Spring AI Chat Completions with OpenAI or Ollama

With Spring AI on the classpath, calling a chat model comes down to three things: add the right starter, set an API key or base URL in config, and inject ChatClient. The same Java code then works whether you’re hitting OpenAI in the cloud or a local Ollama model on your laptop — you swap the dependency and the config, not the logic. This is Part 2 of the Spring AI series. ...

Taming the AI Beast on Your Own Laptop with Ollama

Taming the AI Beast on Your Own Laptop with Ollama

Running LLMs locally with Ollama means an open-weight model lives on your machine — no API keys, no per-token billing, no sending your data to someone else’s servers. You install Ollama, pull a model with one command, and chat from the terminal or hit a local API. For prototyping, privacy-sensitive work, or just learning how these models behave without a credit card attached, it’s the simplest on-ramp there is. Install and run a model Installation is straightforward: grab the Ollama binary for macOS, Linux, or Windows from the project site and run it. Then, from the command line: ...