Spring AI Introduction: Building AI Applications in Java with Spring

  Рет қаралды 23,586

Dan Vega

Dan Vega

Күн бұрын

For the longest time if you wanted to work with Machine Learning you were using Python. That was because python had a lot a really great set of tools for working in this space. Now that we have LLMs like Open AI’s GPT-4 where the P stands for pre-trained we can simply call them like we would any other API. Java is everywhere in the enterprise and we need to start thinking about how to integrate these capabilities into our applications.
In today’s tutorial I want to talk about communicating with an LLM like GPT-4 (or any other LLM) and some of the challenges you might come across. From there I’ll introduce you Spring AI which is going to help us build AI powered applications by solving some of these challenges.
🔗Resources & Links mentioned in this video:
👋🏻Connect with me:
Website: www.danvega.dev
Twitter: / therealdanvega
Github: github.com/danvega
LinkedIn: / danvega
Newsletter: www.danvega.dev/newsletter
SUBSCRIBE TO MY CHANNEL: bit.ly/2re4GH0 ❤️

Пікірлер: 45
@fibfranco
@fibfranco 2 ай бұрын
Such an amazing coincidence haha I started looking at the Spring AI project for the first time a couple hours ago and thought: "wonder if vega has posted something about it" and you just did :) thank you, man!
@DanVega
@DanVega 2 ай бұрын
That is funny 😄 I certainly don’t have all of my subscribers phones tapped 😂
@sohamsarkar174
@sohamsarkar174 2 ай бұрын
Dan loved your session. Please upload a detailed video on RAG
@theunthinkable6280
@theunthinkable6280 2 ай бұрын
Top, Clear, Informative. Good job!
@user-dn8nm9ie2y
@user-dn8nm9ie2y Ай бұрын
Awesome @Dan Vega!! Keeping it simple but effective. Gave me the needed high level overview that I needed
@WisomofHal
@WisomofHal 2 ай бұрын
Oh my goodness. In my current Springboot project I've created a complete "Python Engine", using Java's process builder, to create embedding, parse embeddings, run all the required python scripts, error handling and output to create and run RAG Chains. It was quite fun, but this will help tremendously to take that load off. Thanks for sharing will be looking deeper into this. Cheers!
@grrlgd3835
@grrlgd3835 12 күн бұрын
great stuff Dan... please do more . cant wait to see the next content. keep up the good work
@MohamedDernoun
@MohamedDernoun 2 ай бұрын
How clear is your explanation, best address for people who scare from java!
@younaspa1058
@younaspa1058 2 ай бұрын
Thanks for the wonderful session
@TobilobaOwolabi-wy8cq
@TobilobaOwolabi-wy8cq 2 ай бұрын
Hi Dan. Thank you for the subtle intro to Spring AI. I know you will be looking to do more videos on this topic and I would like to just point out some topics you can look into. 1. RAG with multiple documents instead of one 2. How to use more than one LLM and switch between them(maybe with dynamic configuration properties)
@douglasdotv
@douglasdotv 2 ай бұрын
Thank you for another video.
@minarashidi868
@minarashidi868 Ай бұрын
Thanks, that was so inspiring!
@CodeBank-rw9bq
@CodeBank-rw9bq 2 ай бұрын
Exactly this is what I was looking for ❤
@stephaneislistening6103
@stephaneislistening6103 Ай бұрын
Very cool Thanks !
@scitechplusexplorer2484
@scitechplusexplorer2484 2 ай бұрын
Hey Dan, hello, Good Evening! Please make a full video on GraphQL including Pagination with latest Spring Boot version. It would be very helpful.
@DanVega
@DanVega 2 ай бұрын
I have done a video on pagination you can watch it here kzfaq.info/get/bejne/ab-Ehstp27CclY0.html
@backtoGodhead0
@backtoGodhead0 Ай бұрын
so cool, God bless you!
@walterpalladino1965
@walterpalladino1965 2 ай бұрын
Great video. Can Spring AI interact with a local LLM? If can do it, will be great to se an example. Thanks.
@Bibhaw
@Bibhaw 2 ай бұрын
Well explained, Thanks vega :) Can't we directly autowired ChatClient ?
@sagarbhat1
@sagarbhat1 2 ай бұрын
Thanks for taking time to make this video Dan. I’m building a RAG based application and have tried LangChain4j and Spring AI, and at this stage LangChain4j seems to have more features (Chat Memory, Hybrid semantic search with Azure AI search vector store) compared to Spring AI. But at the rate at which Spring AI is being developed, I’m sure it will catch up. Quick question - is there an easy way to log the requests and responses to/from the Open AI service in Spring AI? In Langchain4j it’s as simple as adding a property.
@DanVega
@DanVega 2 ай бұрын
Spring AI in an MVC stack is using the RestClient. You need to enable logging for what ever underlying http client you're using which by default is the HttpUrlConnection. You can set this logging level to see the request/response. I would take this one step further though and add the actuator where you can then get metrics on all of these calls. logging.level.sun.net.www.protocol.http.HttpURLConnection=DEBUG
@sagarbhat3884
@sagarbhat3884 2 ай бұрын
@@DanVega I tried this (logging.level.sun.net.www.protocol.http.HttpURLConnection=DEBUG) but it did not help. I could not see any trace of the request and response to/from the AI model.
@gsilveralan
@gsilveralan 2 ай бұрын
Geat video please do one with RAG
@stephaneislistening6103
@stephaneislistening6103 Ай бұрын
On SpringBoot 3.3.0 here and the OpenAI API seems to have changed quite a bit already in a month since this video was published.
@stephaneislistening6103
@stephaneislistening6103 Ай бұрын
And so the chatClient bean could not be found, with the default implementation being: class DefaultChatClient implements ChatClient
@alanbarrientos9978
@alanbarrientos9978 17 күн бұрын
@stephaneislistening6103 I am facing with the same problem Edit: I found the solution Try using OpenAiChatModel class instead of using the ChatClient interface and let the dependency injection made his work
@alanbarrientos9978
@alanbarrientos9978 17 күн бұрын
​@@stephaneislistening6103 I found the solution Try using OpenAiChatModel class instead of using the ChatClient interface and let the dependency injection made his work
@alanbarrientos9978
@alanbarrientos9978 16 күн бұрын
@@stephaneislistening6103 I found the solution Try using OpenAiChatModel class instead of using the ChatClient interface and let the dependency injection made his work
@checkantetibo
@checkantetibo 2 ай бұрын
Interesting
@terrabys
@terrabys 2 ай бұрын
Is there support for agentic workflow?
@adityasinghrajput7815
@adityasinghrajput7815 2 ай бұрын
Sir please upload a full spring boot beginner to advanced series and after that spring security then spring cloud then micro servise then full project with spring boot integration of spring AI
@BananBananski
@BananBananski 2 ай бұрын
Looks like the ChatClient is synchronous and some models take a long time to respond - that would be a bottleneck in many use cases. Is there an asynchronous implementation as well?
@DanVega
@DanVega 2 ай бұрын
Yes there is a StreamingChatClient docs.spring.io/spring-ai/reference/api/chatclient.html#_streamingchatclient
@nikhilrathi3627
@nikhilrathi3627 16 күн бұрын
Hey @Danvega Can we not build these applications without using open Ai . ? Cause that costs. I was thinking to build a audio generation platform where users can build the songs based on different genres.
@muslehhaj4164
@muslehhaj4164 2 ай бұрын
Hello Spring Boss 💪, I have a course idea but no one in "Udemy" did it yet K I've tried few course in Udemy , but none of them completed... I'm looking for a full-stack project wise course using spring boot as backend & Vaadin for front end .... but not sure if Vaadin is the right choice to build a real-life application .... please Advise me Boss ⚠
@crampanelarutzi
@crampanelarutzi 2 ай бұрын
please make a video about weka framework.
@satyam949
@satyam949 13 сағат бұрын
I think this is outdate video, I also see that chatClient object is not getting injected with constructor argument. On the other hand chatClient's call(String) method is deprecated. Did any one had a chance to make it work ?
@kafkaesqued
@kafkaesqued Ай бұрын
Hello Sir, could you provide a reference for SVN to GitHub migration with the help of Spring Java + GenAI tech
@swethavemula1524
@swethavemula1524 17 күн бұрын
getting error as " 'call(java.lang.String)' is deprecated and marked for removal " . By which method do i need to modify
@srisan9344
@srisan9344 3 күн бұрын
same problem did you modify it
@satyam949
@satyam949 13 сағат бұрын
@@srisan9344 I think this is outdate video, I also see that chatClient object is not getting injected with constructor argument. On the other hand chatClient's call(String) method is deprecated. Did any one had a chance to make it work ?
@davidwaziri333
@davidwaziri333 Ай бұрын
Can you use free ChatGPT API key for this?
@Gijox1
@Gijox1 2 ай бұрын
Very nice!
@antonslonkin
@antonslonkin 2 ай бұрын
Interesting!!!
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 74 МЛН
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 9 МЛН
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 6 МЛН
Introduction to Spring AI | Spring Ai Framework
9:25
Daily Code Buffer
Рет қаралды 31 М.
Spring Boot APIs Gateway in 20 Minutes
22:50
The IT Wizard
Рет қаралды 8 М.
Generative AI in a Nutshell - how to survive and thrive in the age of AI
17:57
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Alex Hyett
Рет қаралды 195 М.
Building Intelligent Applications With Spring AI
1:15:34
IntelliJ IDEA, a JetBrains IDE
Рет қаралды 15 М.
How I’d learn ML in 2024 (if I could start over)
7:05
Boris Meinardus
Рет қаралды 944 М.
CY Superb Earphone 👌 For Smartphone Handset
0:42
Tech Official
Рет қаралды 827 М.