Dan Vega
Dan Vega
  • 447
  • 4 841 349
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 ❤️
Переглядів: 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
I have been named a Java Champion
Переглядів 2,8 тис.5 місяців тому
I have been named a Java Champion
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

КОМЕНТАРІ

  • @eugene676
    @eugene676 13 годин тому

    THAAAANKSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @JohnSmith-zs6ow
    @JohnSmith-zs6ow 18 годин тому

    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.

    • @DanVega
      @DanVega 16 годин тому

      This is a known issue you can follow here for updates github.com/spring-projects/spring-boot/issues/38832

    • @DanVega
      @DanVega 16 годин тому

      There is a workaround in that issue if you're interested.

  • @gamires
    @gamires День тому

    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!

  • @OmerFarukAY-ij2xg
    @OmerFarukAY-ij2xg День тому

    It would be great idea to add your shortcuts to your youtube video that you use

  • @PranavInamdar-g2c
    @PranavInamdar-g2c 2 дні тому

    Thanks dan for sharing the knowledge. Really helpful!!

  • @satyam949
    @satyam949 2 дні тому

    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 ?

  • @TheSowikHD
    @TheSowikHD 2 дні тому

    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.

  • @parashar1505
    @parashar1505 2 дні тому

    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

  • @user-vm2in8yc6x
    @user-vm2in8yc6x 2 дні тому

    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

  • @youtuger
    @youtuger 3 дні тому

    i have to try package by feature one day. But i wonder what happens when i have 50 domain objects for different services

  • @theblueplanet3576
    @theblueplanet3576 3 дні тому

    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.

  • @ArleyChannel
    @ArleyChannel 3 дні тому

    How can I use Spring AI with Google Gemini ?

    • @DanVega
      @DanVega 16 годин тому

      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

  • @tomislavkovacevic7085
    @tomislavkovacevic7085 3 дні тому

    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

  • @wlytimo
    @wlytimo 4 дні тому

    kes kil a macron

  • @ayanSaha13291
    @ayanSaha13291 4 дні тому

    I really liked your explanation Dan, thanks for the video.

  • @FrankAn-io7bz
    @FrankAn-io7bz 4 дні тому

    #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.

    • @FrankAn-io7bz
      @FrankAn-io7bz 4 дні тому

      But using interfaces also hides the implementation details, right? The caller can use the functionality without caring about the details.

  • @fakename2415
    @fakename2415 4 дні тому

    Wait... some people arent using dark mode?

  • @mouadmuslim
    @mouadmuslim 4 дні тому

    You deserve the thumb up

  • @ErikWeibust
    @ErikWeibust 4 дні тому

    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.

    • @DanVega
      @DanVega 16 годин тому

      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.

    • @ErikWeibust
      @ErikWeibust 15 годин тому

      @@DanVega Happy to share it. You still hold the title of My Favorite UA-camr! Great work you're doing on your channel!

  • @srisan9344
    @srisan9344 5 днів тому

    Why cant i use ChatClient.call() method in intellij

  • @Dave09182010
    @Dave09182010 5 днів тому

    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.

    • @DanVega
      @DanVega 16 годин тому

      It's just something I'm experimenting with. Appreciate the feedback.

  • @qzf4928
    @qzf4928 6 днів тому

    i am a second-hand new in java

  • @tysonlawrie
    @tysonlawrie 6 днів тому

    This was great. #2 and #3 are what was drilled into years ago and ive never questioned them.

  • @dvaderjava666
    @dvaderjava666 6 днів тому

    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). :(

  • @thatclimberguy4883
    @thatclimberguy4883 6 днів тому

    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.

  • @ArulBenjaminChandru
    @ArulBenjaminChandru 6 днів тому

    Nice one Dan

  • @dariuszchmiea3567
    @dariuszchmiea3567 6 днів тому

    Good but in production usages not so usefull.

    • @DanVega
      @DanVega 6 днів тому

      What about a chat bot that uses your internal documents?

    • @ajayantony4412
      @ajayantony4412 2 дні тому

      @@DanVega can we train a model with custom data? If possible could you please make a video on it.

  • @josemartins-jumia
    @josemartins-jumia 6 днів тому

    pom..xml

  • @EliasX962
    @EliasX962 7 днів тому

    one question which theme are you using ?

  • @renyuliu5650
    @renyuliu5650 7 днів тому

    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?

    • @ArulBenjaminChandru
      @ArulBenjaminChandru 6 днів тому

      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.

    • @DanVega
      @DanVega 6 днів тому

      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.

  • @miniSasquatch23
    @miniSasquatch23 7 днів тому

    what are you using for screen recording?

    • @DanVega
      @DanVega 6 днів тому

      Screen Studio

  • @lifeisgoodoutdoors2680
    @lifeisgoodoutdoors2680 7 днів тому

    Refreshing to enjoy a few moments of what the project is and what it does at the very beginning.

  • @shomer2009
    @shomer2009 7 днів тому

    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 😊

  • @hyunjoonchoi7393
    @hyunjoonchoi7393 7 днів тому

    Thank you for today's video as well!

  • @niveshsengar
    @niveshsengar 7 днів тому

    frameOption() is deprecated we can use something like - .headers(headers -> headers.frameOptions(fo -> fo.sameOrigin()))

  • @AndreTiconaRollano
    @AndreTiconaRollano 7 днів тому

    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.

  • @abneruriarte1441
    @abneruriarte1441 8 днів тому

    how do you do to have a fancy colored terminal in intellij? mine is just plane black & white :(

  • @user-sh3qh9bg3c
    @user-sh3qh9bg3c 8 днів тому

    hello,sir.How to fix the slf4j😂i want to know it,can u make a video?

  • @gauthamfz19
    @gauthamfz19 8 днів тому

    Hey can you make a video on Data JPA or give some video links for it?

  • @nainglinmaung6365
    @nainglinmaung6365 8 днів тому

    May I know at 20:57, where did you get this Authorization: "Basic ZHZlZ2E6cGFzc3dvcmQ=" from?

  • @HariprasathS-eu6ml
    @HariprasathS-eu6ml 9 днів тому

    Sir Can you please upload a video of any small project on Spring boot + Groovy???

  • @MariAngelesGarcia-m2c
    @MariAngelesGarcia-m2c 9 днів тому

    wow!! great feature!! thanks, dan

  • @ignaciogarcia7210
    @ignaciogarcia7210 10 днів тому

    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. :)

  • @kamaladdi2661
    @kamaladdi2661 10 днів тому

    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?

  • @ChikereEzeh
    @ChikereEzeh 10 днів тому

    ChatClient Builder is so cool!!!! Awesome stuff from the team

  • @ahmadshlool5803
    @ahmadshlool5803 10 днів тому

    Great work!

  • @neotechfriend
    @neotechfriend 11 днів тому

    wow

  • @kappaj01
    @kappaj01 11 днів тому

    This is now really looking like a properly polished Spring product. Great work!

  • @Dr_Kurt
    @Dr_Kurt 11 днів тому

    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?

    • @hfislwpa
      @hfislwpa 6 днів тому

      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

  • @justreason5868
    @justreason5868 11 днів тому

    Thanks for sharing this piece. An excellent snippet to apply OpenAI into providing intelligent-ready application using SpringAI.