Building a Streaming Chatbot with Spring Boot and Spring AI

preview_player
Показать описание
Learn how to create a responsive, streaming chatbot using Spring Boot and Spring AI. Learn why streaming responses, like those seen in ChatGPT, provide a superior user experience compared to waiting for complete responses.

This tutorial covers:
✅ Setting up a Spring Boot project with Spring AI
✅ Implementing both traditional and streaming response methods
✅ Integrating with Anthropic's Claude 3.5 Sonnet (adaptable to other LLMs)
✅ Creating a simple UI with HTMX and Tailwind CSS
✅ Handling streaming data on the front-end with JavaScript

Whether you're a seasoned Spring developer or new to AI integration, this video offers valuable insights into building more engaging chatbot interfaces. Discover how easy it is to leverage Spring AI's portable chat completion across different LLMs, and take your conversational AI projects to the next level.

🔗Resources & Links mentioned in this video:

👋🏻Connect with me:

Рекомендации по теме
Комментарии
Автор

It's a foundation, but exactly what I need for a solid start in my corporate environment. Really exciting to combine the speed, organization and cleanliness of spring apps with the AI ​​world. Thanks for sharing and clear instructions

PauloHenrique-ytsh
Автор

I found this video very very very very very very very very too too too too too too useful. Thanks, Dan

yemzibossa
Автор

Fantastic video Dan. Kind request, kindly do a tutorial showcasing spring AI capability to parse images/pdfs to text or some json form.

martinmiano
Автор

Excellent video - really like the personalized screens!

kappaj
Автор

Hi Dan, thanks for the amazing contribution to java-spring community. Kindly create a complete playlist on spring reactive programming

razatech
Автор

This video is really good Dan . Thanks for sharing.

souravmahapatra
Автор

Hi Dan, Thank you for developing videos for Spring AI. I have a question: if I want to initialize both the ChatGPT and Claude clients, what would be the best approach for setting that up?

ssomasun
Автор

Great and simple, thanks!
(Maybe I missed the explanation, but why one method is Post and the other is Get?)

odeds
Автор

I'm having some issues. I tried doing the same using Spring Web and Gemini, but it didn't work. Gemini would finish generating all the content first and then return it. It only worked when I used Spring Web Flux instead of Spring Web.

Another approach I tried was using Spring Web and Ollama; this time, almost everything worked fine. The response generated by the AI came in small pieces, but there were no spaces separating the generated words, causing all the words to stick together. For example: 'Hi, how are you?' -> 'Hi, howareyou?'

Has anyone else had these same issues?

Whoisandreeeee
Автор

Is it possible todo the same with ollama?

tzarukjan
Автор

why spring, this could be done with html, css and js. please answer, honest;y like to know.

naninunna
Автор

Getting error gpt-4o doesn't exist or you haven't access for it

DivyaChachane
Автор

10:30 Aha at last some reactive programming. So yeah, i found a reason of learning Spring WebFlux.

sadiulhakim
Автор

it's shows An error occurred while fetching the response. please try again

abirmahmud