Spring Boot + OpenAI ChatGPT API Integration | JavaTechie

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.พ. 2025
  • In this video, let’s take a closer look at the OpenAI API, and integrate ChatGPT with a Spring Boot microservice.
    #JavaTechie #springBoot #ChatGPT
    Spring boot microservice Premium course lunched with 70% off 🚀 🚀
    Hurry-up & Register today itself!
    COURSE LINK : javatechie5246...
    PROMO CODE : JAVATECHIE50
    GitHub:
    github.com/Jav...
    Blogs:
    / javatechie
    Facebook:
    / javatechie
    Join this channel to get access to perks:
    www.youtube.co...
    guys if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie
    Disclaimer/Policy:
    --------------------------------
    Note : All uploaded content in this channel is mine and its not copied from any community ,
    you are free to use source code from above mentioned GitHub account

ความคิดเห็น • 139

  • @vincentmax4571
    @vincentmax4571 ปีที่แล้ว +26

    You are always way ahead of the crowd!! We are blessed to have you.

    • @Javatechie
      @Javatechie  ปีที่แล้ว +1

      Thank you buddy 😊

  • @inhtruongvu7618
    @inhtruongvu7618 ปีที่แล้ว +2

    00:05 Spring Boot + Tích hợp API OpenAI ChatGPT
    03:14 Triển khai tích hợp API OpenAI ChatGPT trong Spring Boot
    05:48 Để sử dụng API ChatGPT, chúng tôi cần chuyển khóa API dưới dạng mã thông báo rào cản và cấu trúc yêu cầu của chúng tôi đúng cách.
    08:19 Định cấu hình định dạng yêu cầu và phản hồi
    11:06 Tạo DTO với yêu cầu, mô hình và tin nhắn
    13:56 Chúng tôi có thể mã hóa khóa API trong ứng dụng
    16:57 Xảy ra lỗi do thiếu cấu hình khóa API trong mẫu còn lại
    19:14 Tích hợp Spring Boot với API ChatGPT
    21:32 Tích hợp Spring Boot với OpenAI ChatGPT API
    Crafted by Merlin AI.

  • @itzfunnyenough8711
    @itzfunnyenough8711 ปีที่แล้ว +9

    You are super talented and a always needed tutor for many of Java software developer

  • @barrazero9571
    @barrazero9571 10 หลายเดือนก่อน +2

    Amazing Video, thanks for the explanation and solution brother!

  • @kishorerudrala
    @kishorerudrala 8 หลายเดือนก่อน +1

    Anyone who can't this explanation
    You can explain each and everything is good

  • @sunilsurduse5
    @sunilsurduse5 ปีที่แล้ว +4

    Super tutorial. Appreciate your teaching and efforts.💯

  • @umamaheswar6705
    @umamaheswar6705 ปีที่แล้ว +2

    Started my day with this tutorial boosted a lot...great explaination and content.❤❤❤❤❤❤❤Thanks a lot

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Keep learning buddy 😁.

  • @manokarana7927
    @manokarana7927 ปีที่แล้ว +3

    I love your teaching way

  • @GopiKrishna-os8vm
    @GopiKrishna-os8vm 7 หลายเดือนก่อน +1

    very neatly explained!!

  • @gopisambasivarao5282
    @gopisambasivarao5282 ปีที่แล้ว +1

    Really you are god gift for all of us.. Thanks @Java Techie...

  • @ikennaj.akuchi648
    @ikennaj.akuchi648 ปีที่แล้ว +1

    Nice, I always look forward to your videos

  • @utkarshmeshram6612
    @utkarshmeshram6612 4 หลายเดือนก่อน +1

    exactly what i was looking for, sidhi baat no bkaas.

  • @shaikakbarali5257
    @shaikakbarali5257 ปีที่แล้ว +1

    Good work Basant. Truly worth.

  • @mayankkumarsharma1632
    @mayankkumarsharma1632 ปีที่แล้ว +2

    Mza aa gya

  • @narutodihargo
    @narutodihargo 11 หลายเดือนก่อน +1

    Great video awesome work

  • @rashmiranjanswain601
    @rashmiranjanswain601 ปีที่แล้ว +5

    Great....loved it....can we continue our conversation with threads like chatGPT

  • @dheebanm3207
    @dheebanm3207 ปีที่แล้ว +6

    Your my best mentor bro, Thank you :)

  • @Rajnish089
    @Rajnish089 ปีที่แล้ว +2

    Awesome brother

  • @ruslanzubkov4297
    @ruslanzubkov4297 ปีที่แล้ว +1

    Great job, bro!

  • @SURACHITAMAJUMDAR-h6c
    @SURACHITAMAJUMDAR-h6c 11 หลายเดือนก่อน +1

    Superb content

  • @veerababumanda8517
    @veerababumanda8517 ปีที่แล้ว +1

    So nice explanation sir your given high level knowledge thank you so much sir ❤❤❤❤

  • @chetanbhandari3033
    @chetanbhandari3033 ปีที่แล้ว +1

    Thanks Basant for useful knowledge

  • @baredhulaslam5897
    @baredhulaslam5897 6 หลายเดือนก่อน +1

    Very Nice video....

  • @farhan77388
    @farhan77388 ปีที่แล้ว +1

    Maza agaya❤

  • @SandeepAS-ov3fk
    @SandeepAS-ov3fk ปีที่แล้ว +1

    amazing...

  • @alexbrun6863
    @alexbrun6863 ปีที่แล้ว +1

    Nice guide!

  • @wanderlustriderpawar3336
    @wanderlustriderpawar3336 10 หลายเดือนก่อน +1

    Is the section of playground updated as i am not getting option to download the curl ,please help

  • @mustafa-cd4od
    @mustafa-cd4od ปีที่แล้ว +2

    How did you automatically expand the method for the rest template ? Do you have any short cuts ?

    • @Javatechie
      @Javatechie  ปีที่แล้ว +1

      Not getting you, what expands?

    • @Javatechie
      @Javatechie  ปีที่แล้ว +1

      Not getting you, what expands?

  • @gopikrishnaarava27
    @gopikrishnaarava27 ปีที่แล้ว +1

    thank you soo much for ur video sir

  • @govardhanmopada1235
    @govardhanmopada1235 ปีที่แล้ว +1

    Thank you bro for sharing knowledge ❤

  • @tech_status201
    @tech_status201 ปีที่แล้ว +1

    how to add refresh token, so whenever open key gets expire it will automatically generate new key, as open ai doesn't provide refresh token, please explain this.

  • @DurgeshSoni-c6v
    @DurgeshSoni-c6v ปีที่แล้ว +1

    hello java techie , can u make a video for this topic. I'm stuck for a couple of months
    how to implement a webhook in spring boot project like zapier has webhook same I want to implement in my project.

  • @seangsengleaph8295
    @seangsengleaph8295 ปีที่แล้ว +1

    Yoo, that is so cool to create video like this and I really like it but can you change from maven to Gradle?

  • @somethingnew8567
    @somethingnew8567 ปีที่แล้ว +1

    Thank you so much 👍

  • @pacificj2943
    @pacificj2943 4 หลายเดือนก่อน

    Hey, in ChatGPTRequest class ,why did you(he) pass promt as a String and added it into the list of Message objects, you could've simply passed it as an Object of Message right?
    PS : Thanks for this tutorial and the earlier ones on Spring Boot

  • @rahulpise1840
    @rahulpise1840 ปีที่แล้ว +1

    Very informative tutorial bro

  • @aryanramedwar7921
    @aryanramedwar7921 ปีที่แล้ว +2

    In my case it gives me a message "you exceeded your current quota, please check your plan and billing details " what should i do next

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Please try with a different email id

  • @praveens2272
    @praveens2272 ปีที่แล้ว +2

    And please start using webclient for api calls evn for synchronous also.

    • @Javatechie
      @Javatechie  ปีที่แล้ว +1

      Yes that's the good choice 👍

  • @dawidbubernak1876
    @dawidbubernak1876 ปีที่แล้ว +2

    How can you ask the GPT model about the current temperature in the city? GPT has information gathered up to September 2021. Could you please explain that a little bit? Thank you for your all content

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Not possible that is the problem in chatGPT . He doesn't have current information

    • @jatinsharma3792
      @jatinsharma3792 ปีที่แล้ว

      that means you have a limit of exceeding the characters.

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Not getting you which character limit you are talking about

  • @nicholashubbert2837
    @nicholashubbert2837 ปีที่แล้ว

    Thanks!

  • @Arunkumar18
    @Arunkumar18 ปีที่แล้ว +1

    I tired with new account with fresh mobile number and email id even then it is still throwing "You exceeded your current quota, pls check billing details."
    I guess it is now mandatory to setup payment details for accessing the OpenAI APIs.

    • @Javatechie
      @Javatechie  ปีที่แล้ว +1

      No buddy initially i found this issue with my old account then i created a new one and tried it worked for me

  • @generallifenow
    @generallifenow ปีที่แล้ว +1

    MacBook M1 or m2 which machine you are using for development... And what are the shortcuts are available for Mac machine...pls reply

    • @Javatechie
      @Javatechie  ปีที่แล้ว +1

      It's M1. Shortcuts for any ide are you looking for?

    • @generallifenow
      @generallifenow ปีที่แล้ว

      @@Javatechie eclipse ide

    • @generallifenow
      @generallifenow ปีที่แล้ว

      @@Javatechie pls make proper video on MacBook Air M1 or m2 ... For eclipse & intellij idea shortcuts

  • @ramkarlapudi662
    @ramkarlapudi662 ปีที่แล้ว

    What is the best approach to add conversation history when user instructions refer to prior messages ? can you implement that functionality ?

  • @shymxl
    @shymxl ปีที่แล้ว +2

    "error": {
    "message": "You exceeded your current quota, please check your plan and billing details.",
    "type": "insufficient_quota",
    "param": null,
    "code": null
    }
    i get this response.What is this? What can i do.And my response status is 429 Too many request

    • @Javatechie
      @Javatechie  ปีที่แล้ว +1

      Yes this is annoying, please try logins with a new account with a different email id and then generate API key 🗝️ .it will work

    • @akashbaghel3758
      @akashbaghel3758 8 หลายเดือนก่อน

      @@Javatechie i tried with new account but still got this error

  • @BhavitKanzariya
    @BhavitKanzariya ปีที่แล้ว +1

    Is there any price to be paid for test ?? because i have seen this video today and implemented thorough my api key but it gives me error
    Rate limit exceeded. Please try again later.
    @Java Techie can you help me for this?

    • @Javatechie
      @Javatechie  ปีที่แล้ว +1

      Please sign up with different email

    • @surajmsd
      @surajmsd ปีที่แล้ว +1

      @@JavatechieI am getting the same error. And my key is funded. I used the same key in colab to make a request using the python api. And it works and responds there. It has to be some changes they made with the api. Could you please make sure this method still works?

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Ohh is it ? Let me check the documentation and will update you

    • @surajmsd
      @surajmsd ปีที่แล้ว +1

      @@Javatechie Sorry about that. I found out what the problem was. the method still works and is standard. I had an old key in my environment variables that was overriding the @(${Openai_api_key}) and that key is old and not funded. Sorry for the confusion. Great video. Hope this helps others.

  • @CemretheFangirl
    @CemretheFangirl ปีที่แล้ว

    Why did you define messages in ChatGptRequest a List?

  • @ajaypardhe6594
    @ajaypardhe6594 ปีที่แล้ว +1

    Sir , kya Eureka server and client deprecated ho chuki hai , spring initilizr par unsupported bata Raha hai 3.1.0 ke sath

    • @Javatechie
      @Javatechie  ปีที่แล้ว +1

      No not deprecated, but let me cross verify once

  • @chetanuppin6259
    @chetanuppin6259 7 หลายเดือนก่อน

    How to parse an email context and send response using openAI in spring boot project?

  • @danozzoX
    @danozzoX 9 หลายเดือนก่อน +2

    Do I have to use the paid version of openai?

    • @Javatechie
      @Javatechie  9 หลายเดือนก่อน +2

      Now it's paid . Free version is not available

    • @danozzoX
      @danozzoX 9 หลายเดือนก่อน

      @@Javatechie Thank you!

    • @danozzoX
      @danozzoX 9 หลายเดือนก่อน

      ​@@Javatechie Is there a free alternative?

  • @khanahmad-co1fw
    @khanahmad-co1fw ปีที่แล้ว +1

    Shweta believes in you sir,

  • @satyaenubothu859
    @satyaenubothu859 ปีที่แล้ว +1

    Hi Bro. Please start one cloud technology (Aws or Azure or GCP) on Spring Boot Developer perspective.

    • @Javatechie
      @Javatechie  ปีที่แล้ว +4

      Hi buddy AWS is already there please have a look into below 👇
      AWS (Amazon Web Services): th-cam.com/play/PLVz2XdJiJQxxurKT1Dqz6rmiMuZNdClqv.html

  • @Black_hacker-mj2ro
    @Black_hacker-mj2ro ปีที่แล้ว +1

    Hello, sir please make a vid api matrix distances calculation using spring boot

  • @rashidbekraximov2634
    @rashidbekraximov2634 ปีที่แล้ว

    Thanks 👍👍👍👍👍👍

  • @JitendraSingh-i3q4w
    @JitendraSingh-i3q4w ปีที่แล้ว +1

    "error": {
    "message": "You exceeded your current quota, please check your plan and billing details.",
    "type": "insufficient_quota",
    "param": null,
    "code": null
    }
    I am getting this kind of error

    • @rishikeshkmr
      @rishikeshkmr ปีที่แล้ว +1

      While trying for the first time only,
      I am also getting the same error

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Try with a different email id

  • @akashmohapatra1008
    @akashmohapatra1008 9 หลายเดือนก่อน

    Can we able to create chart using json in spring ai

  • @abdulrenishr
    @abdulrenishr ปีที่แล้ว

    Great tutorials.
    Can u create camunda spring boot client with rest communications to engine, and a business app using this client

  • @omit_krish
    @omit_krish ปีที่แล้ว +1

    Sir I'm getting error while pass the key that was (
    You exceeded your current quota, please check your plan and billing details 2.insufficient _quota

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      I also had the same issue then tried with a different account and it works

    • @omit_krish
      @omit_krish ปีที่แล้ว +1

      Thanks for quick response coming to the point I tried several times but I'm getting same error could pls let me know correct process to sorting this problem...

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Have you tried with a different account ?

    • @omit_krish
      @omit_krish ปีที่แล้ว +1

      Yes sir mine done with different account

  • @explorerabhi5834
    @explorerabhi5834 5 หลายเดือนก่อน

    Its showing me that insufficient quota . How to solve it ? Please guide me anyone pls

  • @Know_Youself
    @Know_Youself ปีที่แล้ว +1

    Video on ChatGpt create junit test class

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Already uploaded please check

  • @anushathota5277
    @anushathota5277 ปีที่แล้ว

    Can’t we directly integrate to IDE to get response?

  • @aadiraj6126
    @aadiraj6126 ปีที่แล้ว

    Basant bhai, I'm getting this error:
    "You exceeded your current quota, pls check billing details."
    Is it mandatory to set up billing debit card details, even for free trial of apikey for this program?

    • @Javatechie
      @Javatechie  ปีที่แล้ว +1

      Yes this is annoying, please try logins with a new account with a different email id and then generate API key 🗝️ .it will work

    • @harshaggarwal1967
      @harshaggarwal1967 ปีที่แล้ว +1

      @@Javatechie I tried with 2 different accounts, still I'm getting the same error. Any suggestions?

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      For me it works in a second account . Give last try with a different account and let me know if the issue is not resolved

    • @ZtowhyA
      @ZtowhyA ปีที่แล้ว +1

      @@Javatechie works for me 2nd account thanks

  • @asishkumarmahapatro1813
    @asishkumarmahapatro1813 8 หลายเดือนก่อน

    Hello sir !! Please make one video on how to bypass billing limit for using open ai api in spring boot. Because i tried many times to access this open ai api in my spring boot project but getting billing hard limit reached exception. Even i created new account for this also. So please make one video with exception and how to tackle this . Thank you

    • @akashbaghel3758
      @akashbaghel3758 8 หลายเดือนก่อน

      same here

    • @Javatechie
      @Javatechie  8 หลายเดือนก่อน

      Ashish and Akash we can't bypass this . AI is smart enough than us 🤣😂. So we can't cheat him

    • @akashbaghel3758
      @akashbaghel3758 8 หลายเดือนก่อน

      I have created a new account but still i got this error

    • @Javatechie
      @Javatechie  8 หลายเดือนก่อน

      @@akashbaghel3758 yes even I too facing same issue. Didn't find any workaround

  • @TeTsai-f4v
    @TeTsai-f4v ปีที่แล้ว

    {
    "error": {
    "message": "You exceeded your current quota, please check your plan and billing details.",
    "type": "insufficient_quota",
    "param": null,
    "code": "insufficient_quota"
    }
    }
    I'm getting this error after adding my secret key in Postman, please advise. Thank you.

    • @miroslavmilosavljevic377
      @miroslavmilosavljevic377 ปีที่แล้ว +1

      You didn't activate trial or your trial has expired.

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Try using different account . ChatGPT will be releasing paid version and removing support of feee

  • @subramanianchenniappan4059
    @subramanianchenniappan4059 ปีที่แล้ว

    thanks

  • @joseantoniovr606
    @joseantoniovr606 ปีที่แล้ว

    How you do that for gpt-4-vision-preview?

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Same approach can't work ?

  • @VijayKumar-kq2yw
    @VijayKumar-kq2yw ปีที่แล้ว

    Am getting an error exceed your account while accessing endpoint url using post man

  • @shaikakbarali5257
    @shaikakbarali5257 ปีที่แล้ว +1

    Getting 404 error "not found" in response. Please help

  • @praveens2272
    @praveens2272 ปีที่แล้ว +1

    Hey bro I have already done this.

  • @amitswain7228
    @amitswain7228 ปีที่แล้ว +1

    Don’t u think this will take our job soon?

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      No not at all 😜

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      No not at all 😜

    • @thejavaacademy-18
      @thejavaacademy-18 ปีที่แล้ว +1

      No. It'll only make our job easier

    • @vincentmax4571
      @vincentmax4571 ปีที่แล้ว

      It will reduce your paycheck though by making your job easier 😂

  • @sheikh_mohd_Uzair
    @sheikh_mohd_Uzair ปีที่แล้ว

    create aproject for Zoom or Meet using SDK

  • @lll22128
    @lll22128 10 หลายเดือนก่อน +2

    I had to spend 10 USD on this openai to do this project right

    • @Javatechie
      @Javatechie  10 หลายเดือนก่อน +1

      No i will suggest creating different accounts with new email id and phone number

  • @MrBittu69
    @MrBittu69 ปีที่แล้ว +1

    you are beautiful baba - it's a bliss to have you

  • @ayushrana8037
    @ayushrana8037 ปีที่แล้ว +1

    after changing url in property still giving internal server error
    org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 Unauthorized: [no body]
    What to do now ?

  • @iramkumar78
    @iramkumar78 ปีที่แล้ว +1

    Please edit the video and remove the API keys please. That thing has to be blacked out.

    • @Javatechie
      @Javatechie  ปีที่แล้ว +1

      I already revoked it 🤪

  • @akbarr66
    @akbarr66 7 หลายเดือนก่อน

    Sagol dayday , opurem

  • @djv650
    @djv650 ปีที่แล้ว

    Hi @JavaTechie when I am trying to hit the endpoint it is giving me this error
    org.springframework.web.client.HttpClientErrorException$BadRequest: 400 Bad Request: "{ "error": { "message": "Unrecognized request argument supplied: messsages", "type": "invalid_request_error", "param": null, "code": null }}"
    Can you help on this

  • @ZtowhyA
    @ZtowhyA ปีที่แล้ว +1

    suddenly getting this 'sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target'

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Umm not sure. We are not playing with any certificates .How come you are getting this . Can you rerun and try

    • @ZtowhyA
      @ZtowhyA ปีที่แล้ว +2

      @@Javatechie strange suddenly works again without installing the certs.