Member-only story

Spring AI has added support for DeepSeek AI

Integrating Spring AI with DeepSeek R1 locally using Ollama

Saeed Zarinfam
ITNEXT
5 min readFeb 2, 2025

You’ve probably all heard about the DeepSeek R1 model, which is famed for its reasoning, performance, and cost-efficiency these days. In this article, we will discuss how Spring AI can easily support new models like the DeepSeek R1 because of its modular and extensible API, and at the end, we will change the Employee Assistance chatbot source code in the tutorial and use the DeepSeek R1 model instead of OpenAI or Llama.

Integrating Spring AI with DeepSeek R1 locally using Ollama

· How can we use DeepSeek?
· How does Spring AI support DeepSeek?
· Without introduction, let’s code!
Migrating AI model provider from Llama 3.1 to DeepSeek R1
Testing the result
· Final Thoughts

How can we use DeepSeek?

Similar to Llama, DeepSeek is also Open Source, so we have two options to use it using our chatbot application:

How does Spring AI support DeepSeek?

Fortunately, Spring AI supports both approaches, whether you want to run DeepSeek locally using Ollama or use the online DeepSeek Chat

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Published in ITNEXT

ITNEXT is a platform for IT developers & software engineers to share knowledge, connect, collaborate, learn and experience next-gen technologies.

Written by Saeed Zarinfam

✍️ I write about Software Development, including Java, Go, Spring, Containers, K8s, AI, Observability, and more ⋈

Responses (2)

Fortunately, Spring AI supports both approaches, whether you want to run DeepSeek locally using Ollama or use the online DeepSeek Chat service.

Every insight you share makes this article a valuable read—thanks!

Very useful article, thanks!