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
You are always way ahead of the crowd!! We are blessed to have you.
Thank you buddy 😊
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.
You are super talented and a always needed tutor for many of Java software developer
Amazing Video, thanks for the explanation and solution brother!
Anyone who can't this explanation
You can explain each and everything is good
Super tutorial. Appreciate your teaching and efforts.💯
Started my day with this tutorial boosted a lot...great explaination and content.❤❤❤❤❤❤❤Thanks a lot
Keep learning buddy 😁.
I love your teaching way
very neatly explained!!
Really you are god gift for all of us.. Thanks @Java Techie...
Nice, I always look forward to your videos
exactly what i was looking for, sidhi baat no bkaas.
Good work Basant. Truly worth.
Mza aa gya
Great video awesome work
Great....loved it....can we continue our conversation with threads like chatGPT
Your my best mentor bro, Thank you :)
Awesome brother
Great job, bro!
Superb content
So nice explanation sir your given high level knowledge thank you so much sir ❤❤❤❤
Thanks Basant for useful knowledge
Very Nice video....
Maza agaya❤
amazing...
Nice guide!
Is the section of playground updated as i am not getting option to download the curl ,please help
How did you automatically expand the method for the rest template ? Do you have any short cuts ?
Not getting you, what expands?
Not getting you, what expands?
thank you soo much for ur video sir
Thank you bro for sharing knowledge ❤
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.
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.
Yoo, that is so cool to create video like this and I really like it but can you change from maven to Gradle?
Thank you so much 👍
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
Very informative tutorial bro
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
Please try with a different email id
And please start using webclient for api calls evn for synchronous also.
Yes that's the good choice 👍
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
Not possible that is the problem in chatGPT . He doesn't have current information
that means you have a limit of exceeding the characters.
Not getting you which character limit you are talking about
Thanks!
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.
No buddy initially i found this issue with my old account then i created a new one and tried it worked for me
MacBook M1 or m2 which machine you are using for development... And what are the shortcuts are available for Mac machine...pls reply
It's M1. Shortcuts for any ide are you looking for?
@@Javatechie eclipse ide
@@Javatechie pls make proper video on MacBook Air M1 or m2 ... For eclipse & intellij idea shortcuts
What is the best approach to add conversation history when user instructions refer to prior messages ? can you implement that functionality ?
"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
Yes this is annoying, please try logins with a new account with a different email id and then generate API key 🗝️ .it will work
@@Javatechie i tried with new account but still got this error
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?
Please sign up with different email
@@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?
Ohh is it ? Let me check the documentation and will update you
@@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.
Why did you define messages in ChatGptRequest a List?
Sir , kya Eureka server and client deprecated ho chuki hai , spring initilizr par unsupported bata Raha hai 3.1.0 ke sath
No not deprecated, but let me cross verify once
How to parse an email context and send response using openAI in spring boot project?
Do I have to use the paid version of openai?
Now it's paid . Free version is not available
@@Javatechie Thank you!
@@Javatechie Is there a free alternative?
Shweta believes in you sir,
Hi Bro. Please start one cloud technology (Aws or Azure or GCP) on Spring Boot Developer perspective.
Hi buddy AWS is already there please have a look into below 👇
AWS (Amazon Web Services): th-cam.com/play/PLVz2XdJiJQxxurKT1Dqz6rmiMuZNdClqv.html
Hello, sir please make a vid api matrix distances calculation using spring boot
Thanks 👍👍👍👍👍👍
"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
While trying for the first time only,
I am also getting the same error
Try with a different email id
Can we able to create chart using json in spring ai
Great tutorials.
Can u create camunda spring boot client with rest communications to engine, and a business app using this client
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
I also had the same issue then tried with a different account and it works
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...
Have you tried with a different account ?
Yes sir mine done with different account
Its showing me that insufficient quota . How to solve it ? Please guide me anyone pls
Video on ChatGpt create junit test class
Already uploaded please check
Can’t we directly integrate to IDE to get response?
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?
Yes this is annoying, please try logins with a new account with a different email id and then generate API key 🗝️ .it will work
@@Javatechie I tried with 2 different accounts, still I'm getting the same error. Any suggestions?
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
@@Javatechie works for me 2nd account thanks
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
same here
Ashish and Akash we can't bypass this . AI is smart enough than us 🤣😂. So we can't cheat him
I have created a new account but still i got this error
@@akashbaghel3758 yes even I too facing same issue. Didn't find any workaround
{
"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.
You didn't activate trial or your trial has expired.
Try using different account . ChatGPT will be releasing paid version and removing support of feee
thanks
How you do that for gpt-4-vision-preview?
Same approach can't work ?
Am getting an error exceed your account while accessing endpoint url using post man
Yes. Have you solved ?
Getting 404 error "not found" in response. Please help
Please check url mapping
Hey is your error resolved?
@@aasthabisht2593 yes
@@shaikakbarali5257 how can you please guide on that.!
Hey bro I have already done this.
Great 👍
Don’t u think this will take our job soon?
No not at all 😜
No not at all 😜
No. It'll only make our job easier
It will reduce your paycheck though by making your job easier 😂
create aproject for Zoom or Meet using SDK
I had to spend 10 USD on this openai to do this project right
No i will suggest creating different accounts with new email id and phone number
you are beautiful baba - it's a bliss to have you
after changing url in property still giving internal server error
org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 Unauthorized: [no body]
What to do now ?
Did you solve it?
same problem here
Please edit the video and remove the API keys please. That thing has to be blacked out.
I already revoked it 🤪
Sagol dayday , opurem
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
Hi, did you solve this problem?
suddenly getting this 'sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target'
Umm not sure. We are not playing with any certificates .How come you are getting this . Can you rerun and try
@@Javatechie strange suddenly works again without installing the certs.