![Dan Vega](/img/default-banner.jpg)
- 447
- 4 841 349
Dan Vega
United States
Приєднався 9 сер 2007
Dan Vega is a Java Champion, Spring Developer Advocate at Broadcom and lifelong learner. He has been developing software for the web for over 23 years and his superpower is problem-solving.
Dan is a blogger, UA-camr, podcast host, course creator, and speaker. He is a lifelong learner and his passion is sharing his knowledge with the developer community. Dan lives near Cleveland Ohio with his beautiful wife and 2 daughters. When he isn’t writing code or teaching he enjoys spending time with his family, lifting weights, running, or reading a good book.
Dan is a blogger, UA-camr, podcast host, course creator, and speaker. He is a lifelong learner and his passion is sharing his knowledge with the developer community. Dan lives near Cleveland Ohio with his beautiful wife and 2 daughters. When he isn’t writing code or teaching he enjoys spending time with his family, lifting weights, running, or reading a good book.
Building a ChatGPT Clone in Java with HTMX, Spring Boot, and Spring AI
In this video you are going to learn how to build a ChatGPT clone with HTMX, Spring Boot and Spring AI. HTMX allows you to add dynamic behavior to your frontend without having to write JavaScript. Spring AI allows you to easily build intelligent applications with generative AI. In this application you will use OpenAI's GPT-4o but you could easily replace that with your Large Language Model (LLM) of choice.
🔗Resources & Links mentioned in this video:
GitHub Repo: github.com/danvega/chatgpt-clone
Spring AI Playlist: ua-cam.com/play/PLZV0a2jwt22uoDm3LNDFvN6i2cAVU_HTH.html
👋🏻Connect with me:
Website: www.danvega.dev
Twitter: therealdanvega
Github: github.com/danvega
LinkedIn: www.linkedin.com/in/danvega
Newsletter: www.danvega.dev/newsletter
SUBSCRIBE TO MY CHANNEL: bit.ly/2re4GH0 ❤️
🔗Resources & Links mentioned in this video:
GitHub Repo: github.com/danvega/chatgpt-clone
Spring AI Playlist: ua-cam.com/play/PLZV0a2jwt22uoDm3LNDFvN6i2cAVU_HTH.html
👋🏻Connect with me:
Website: www.danvega.dev
Twitter: therealdanvega
Github: github.com/danvega
LinkedIn: www.linkedin.com/in/danvega
Newsletter: www.danvega.dev/newsletter
SUBSCRIBE TO MY CHANNEL: bit.ly/2re4GH0 ❤️
Переглядів: 3 249
Відео
What's new in Spring AI 1.0.0 M1
Переглядів 3 тис.День тому
In this tutorial you will learn about the new features in the latest release of Spring AI, 1.0.0 M1. I am a really big fan of the Chat Client's new fluent API as it makes the code so much more concise and readable. 🔗Resources & Links mentioned in this video: Blog Post: spring.io/blog/2024/05/30/spring-ai-1-0-0-m1-released GitHub Repo: github.com/danvega/spring-into-ai 👋🏻Connect with me: Website...
Getting started with HTMX in Spring Boot with Thymeleaf
Переглядів 5 тис.21 день тому
In this tutorial you will learn what HTMX is and how to use it in your next Spring Boot Application. HTMX allows you to build dynamic web applications without having to write any JavaScript. You will get an introduction to HTMX through building out 4 different examples. 🔗Resources & Links mentioned in this video: GitHub Repo: github.com/danvega/hello-htmx Htmx Website: htmx.org/ 👋🏻Connect with ...
Getting Started with GPT-4o in Spring AI with Chat and Vision Capabilities
Переглядів 3 тис.Місяць тому
In this tutorial you will lean how to get started with GPT-4o in your next Spring application. You will learn how to take advantage of both chat and vision capabilities. 🔗Resources & Links mentioned in this video: GitHub Repo: github.com/danvega/spring-ai-multimodal 👋🏻Connect with me: Website: www.danvega.dev Twitter: therealdanvega Github: github.com/danvega LinkedIn: www.linkedin....
Getting Started with GPT-4o in Java
Переглядів 10 тис.Місяць тому
In this tutorial you will learn how to build a simple Java application that talks to OpenAI's newest model, GPT-4o. You will build a simple application step by step without any external dependencies. By the end of this tutorial you will learn how to signup for an Open AI API key and call the REST API from a Java application. 🔗Resources & Links mentioned in this video: GitHub Repo: github.com/da...
Spring AI Functions - How to register custom Java functions with the Chat Client
Переглядів 3,2 тис.Місяць тому
In this tutorial we will take a look at function calling in Spring AI. This will allow you to register custom Java Functions that the LLM can call when it needs access to real time data. That is the example we will work through in this video and by the end you will have everything you need to start writing your own custom functions in Spring AI 🔗Resources & Links mentioned in this video: GitHub...
Building a Spring Boot Reference Documentation Assistant with Spring AI & GPT-4
Переглядів 4,6 тис.2 місяці тому
In this tutorial we will take a lot of the features in Spring AI we have been talking about to build a command line utility that talks to Open AI's GPT-4. To ensure we have access to the latest documentation we will use the Spring Boot Reference Documentation. We can use a technique called Retrieval Augmented Generation (RAG) with a vector database. This was a really fun demo to put everything ...
Getting started with (Retrieval Augmented Generation) RAG in Java & Spring AI
Переглядів 6 тис.2 місяці тому
In this tutorial we will discuss what RAG is and when we might want to reach for this technique. Ill show you how to get start4d with it in Spring AI using a simple example. If you enjoy this be sure to check out my next video where we take it one step further by using a Vector Database. 🔗Resources & Links mentioned in this video: Spring AI Introduction: ua-cam.com/video/yyvjT0v3lpY/v-deo.html ...
Spring AI - Bring your own data by Stuffing the Prompt
Переглядів 2,5 тис.2 місяці тому
In this tutorial we will take a look at a technique known as stuffing the prompt. This will allow us to add some context to our prompts when sending a request to the LLM. In this example we use Open AI's GPT-4 Model but this technique will work with all of the supported LLMs. 🔗Resources & Links mentioned in this video: Spring AI Introduction: ua-cam.com/video/yyvjT0v3lpY/v-deo.html GitHub Repos...
Using Spring AI's Output Parsers to structure the response from LLMs
Переглядів 3 тис.2 місяці тому
In this tutorial we will discuss the Output Parsers in Spring AI. The Output Parsers will help us get what we want from the LLM and turn them into a desired response. 🔗Resources & Links mentioned in this video: Spring AI Introduction: ua-cam.com/video/yyvjT0v3lpY/v-deo.html GitHub Repository: github.com/danvega/spring-into-ai 👋🏻Connect with me: Website: www.danvega.dev Twitter: ther...
Working with Prompts in Spring AI - Effectively Communicating with LLMs
Переглядів 5 тис.2 місяці тому
In this tutorial we will take a look at how to work with Prompts in. Spring AI. Prompts are the inputs that guide an AI model to generate specific outputs. The design and phrasing of these prompts significantly influence the model’s responses. 🔗Resources & Links mentioned in this video: GitHub Repository: github.com/danvega/spring-into-ai Spring AI Introduction: ua-cam.com/video/yyvjT0v3lpY/v-d...
Spring AI Introduction: Building AI Applications in Java with Spring
Переглядів 24 тис.2 місяці тому
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...
Upgrading your Java & Spring Boot applications with OpenRewrite in IntelliJ
Переглядів 11 тис.3 місяці тому
Upgrading your Java & Spring Boot applications with OpenRewrite in IntelliJ
Java Class Design: When to use a Primitive vs Reference Type
Переглядів 7 тис.3 місяці тому
Java Class Design: When to use a Primitive vs Reference Type
Getting started with Spring Boot AOT + GraalVM Native Images
Переглядів 9 тис.3 місяці тому
Getting started with Spring Boot AOT GraalVM Native Images
How to learn Spring - A collection of resources for Learning Spring
Переглядів 8 тис.3 місяці тому
How to learn Spring - A collection of resources for Learning Spring
Java is slow and verbose (or so they say)
Переглядів 9 тис.3 місяці тому
Java is slow and verbose (or so they say)
Spring MVC Http Interfaces - How to Create a Rest Client with almost no code!
Переглядів 11 тис.4 місяці тому
Spring MVC Http Interfaces - How to Create a Rest Client with almost no code!
5 Common Mistakes Spring Developers Make
Переглядів 16 тис.4 місяці тому
5 Common Mistakes Spring Developers Make
How to create your own custom Spring Boot Starter
Переглядів 9 тис.4 місяці тому
How to create your own custom Spring Boot Starter
Spring Boot Configuration Properties: Working with Lists & Maps
Переглядів 7 тис.5 місяців тому
Spring Boot Configuration Properties: Working with Lists & Maps
Spring Boot Rest Client Interceptors
Переглядів 8 тис.5 місяців тому
Spring Boot Rest Client Interceptors
How to call a Java REST API using JDK Http Client
Переглядів 6 тис.5 місяців тому
How to call a Java REST API using JDK Http Client
Spring Boot Rest Client - How to test HTTP calls using @RestClientTest
Переглядів 6 тис.5 місяців тому
Spring Boot Rest Client - How to test HTTP calls using @RestClientTest
Spring Boot Rest Client - How to change the underlying HTTP Client
Переглядів 7 тис.5 місяців тому
Spring Boot Rest Client - How to change the underlying HTTP Client
Building Full-Stack Applications in Java with Vaadin
Переглядів 10 тис.5 місяців тому
Building Full-Stack Applications in Java with Vaadin
Multiple JDBC Clients - How to configure multiple DataSources in Spring
Переглядів 9 тис.6 місяців тому
Multiple JDBC Clients - How to configure multiple DataSources in Spring
What is the difference between JDBC Client and Spring Data JDBC?
Переглядів 15 тис.6 місяців тому
What is the difference between JDBC Client and Spring Data JDBC?
Significant Scalability Benefits in Spring Boot 3.2 using Virtual Threads
Переглядів 27 тис.6 місяців тому
Significant Scalability Benefits in Spring Boot 3.2 using Virtual Threads
THAAAANKSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!
Just downloaded the tutorial (with no changes) and the Test failed with 100 replies - indicating that the live server was being contacted (not the mocked server). A couple of other people seem to have had the same issue. Has there been a fix for this issue since the video was published? I commented out the JdkClientHttpRequestFactory as suggested in the video - which works - but isn't much use when your other videos recommend this substitution - meaning that I can't test the code I'm writing.
This is a known issue you can follow here for updates github.com/spring-projects/spring-boot/issues/38832
There is a workaround in that issue if you're interested.
Hi Dan. I want to share with you something: with this setup (tutorial) + using the spring authorization (Granted Athorities) + "spring.security.oauth2.resourceserver.jwt.authority-prefix=" (empty value). I get all spring authorization capabilities from granted authorities. Without the protperty spring.security.oauth2.resourceserver.jwt.authority-prefix, the granted aothorities are SCOPE_ROLE_ADMIN, SCOPE_<ANY VALUE>, then the hasRole("ADMIN") does't match with SCOPE_ROLE_ADMIN, because isn't ROLE_ADMIN. Sorry for my english. I hope you understand. Abrazo from Argentina!
It would be great idea to add your shortcuts to your youtube video that you use
Thanks dan for sharing the knowledge. Really helpful!!
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 ?
This is really cool! Especially since I don't have to learn JavaScript and any of the frontend frameworks like React and etc. :D Would love to see a demo with a full app, including security and all that.
For those using colima+docker daemon, need to set these variables - docker context use colima export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=${HOME}/.colima/docker.sock export DOCKER_HOST="unix:///${HOME}/.colima/docker.sock" export TESTCONTAINERS_RYUK_DISABLED=true
is it normal that when i refresh my encoded properties it always get refreshed and shown in my return even if i didn't change them, for example my propertie is user.mdp=ENC(....) this always get returned in actuator refresh even if it didn't get changed
i have to try package by feature one day. But i wonder what happens when i have 50 domain objects for different services
Thanks for sharing. Learnt a lot from the video. 🙏 I have a suggestion on video. Sometimes your profile blocks the code in the IDE and it is a bit annoying.
How can I use Spring AI with Google Gemini ?
Follow the directions in the documentation. If you do that and have a problem please feel free to reach out docs.spring.io/spring-ai/reference/api/chat/vertexai-gemini-chat.html
So in a package by feature approach, where do you put, for example, your Utility classes? Example DateTimeUtil. Since its not a part of any feature
kes kil a macron
I really liked your explanation Dan, thanks for the video.
#3 I always thought it was right to use interfaces, but there's nothing right or wrong with that, personal habits? I agree with your point. Using interfaces without multiple implementations wastes time.
But using interfaces also hides the implementation details, right? The caller can use the functionality without caring about the details.
Wait... some people arent using dark mode?
You deserve the thumb up
Howdy Dan... I agree with one of the commenters that humbly requests you stop the zoom in and zoom out. Viewers can already do that while pausing the video but more importantly it almost makes you sick, with the in and out when you do it quickly.
Its new recording software I am experimenting with. I can add/delete zooms so if there are too many I will try and reduce them in the next one. Thanks for the feedback Erik.
@@DanVega Happy to share it. You still hold the title of My Favorite UA-camr! Great work you're doing on your channel!
Why cant i use ChatClient.call() method in intellij
Dan, love all your content. Please stop using this new zooming in and out. All viewers have their own ability to zoom. You are taking away our control to do so.
It's just something I'm experimenting with. Appreciate the feedback.
i am a second-hand new in java
This was great. #2 and #3 are what was drilled into years ago and ive never questioned them.
Great tutorial, it helped a lot. Question: Now, based on the same example, let's assume a scenario where the table and column names are already set and cannot be changed. Let's say, for the Comment table, that the FK column is not named "post" but some other name that does not match the referenced table Post. How do you force Spring Data JDBC to generate an INSERT for Comment (when saving a Post) with a FK column name other than "post"? I tried setting ForeignKeyNaming.IGNORE_RENAMING in the DefaultNamingStrategy via a @Configuration class but still having the same result (generated INSERT for Comment specifies "post" as the FK column name). :(
Dan! Thanks for this, it was a great walkthrough. Notion is an amazing tool and I am excited to connect it to some other apps.
Nice one Dan
Good but in production usages not so usefull.
What about a chat bot that uses your internal documents?
@@DanVega can we train a model with custom data? If possible could you please make a video on it.
pom..xml
one question which theme are you using ?
Hi, nice job, but just wondering what is the point of this project? It looks the same as the ChatGPT. And you use the ChatGPT actually. So why not directly use ChatGPT but build this web application?
This is to explain on how to integrate AI within Java Ecosystem I guess. Because with this, we can know how to integrate OpenAI in spring boot. This is just for fun learning.
You have to remember that gpt-4o is the LLM and Chat GPT is the product that sits on top of it. What if you wanted to create a chat gpt like experience that had access to your private documents or more up to date information.
what are you using for screen recording?
Screen Studio
Refreshing to enjoy a few moments of what the project is and what it does at the very beginning.
Thank you for the video. Is it possible to have a video on how to tokenize an entire git repository and then start using that As a knowledge base for fine tuning? THANKS 😊
Thank you for today's video as well!
frameOption() is deprecated we can use something like - .headers(headers -> headers.frameOptions(fo -> fo.sameOrigin()))
Hey Dan, is there a way to use HttpInterfaces and RestClient with Spring Cloud to point to service names instead of urls? I'd appreciate if you could point me to any documentation on this regard.
how do you do to have a fancy colored terminal in intellij? mine is just plane black & white :(
hello,sir.How to fix the slf4j😂i want to know it,can u make a video?
Hey can you make a video on Data JPA or give some video links for it?
May I know at 20:57, where did you get this Authorization: "Basic ZHZlZ2E6cGFzc3dvcmQ=" from?
Sir Can you please upload a video of any small project on Spring boot + Groovy???
wow!! great feature!! thanks, dan
Great video! I would love to see Spring AI implemented in a real project. I have difficulty designing AI software with best practices for creating a SaaS. :)
Hi, I have been testing the multimodal option with OpenAI using GPT-4o, and it works great. However, when I migrated the code to use Azure OpenAI with GPT-4o, it doesn't recognize images. To work around this, I had to use a WebClient and manually construct the request, as well as handle the response manually. This method works, but unfortunately, it doesn't support the ChatClient. For reference, I am using spring-ai.version 1.0.0-SNAPSHOT Do you have any ideas why this might be happening?
ChatClient Builder is so cool!!!! Awesome stuff from the team
Great work!
wow
This is now really looking like a properly polished Spring product. Great work!
How did they implement the. entity(Actorfilms. class)? Are they extending the original Chat prompt by something that narrows down the result to the parameters named in the entity?
I think you have a way of getting chat responses to be returned in a defined JSON schema, so presumably can pass the class fields needed and just ask gpt to return with that structure
Thanks for sharing this piece. An excellent snippet to apply OpenAI into providing intelligent-ready application using SpringAI.