ChatGPT Clone - OpenAI API and React Tutorial

  Рет қаралды 142,100

freeCodeCamp.org

freeCodeCamp.org

Күн бұрын

Learn how to use React and the OpenAI API to create an application like ChatGPT. The application can answer our questions, convert the text into different languages, or even convert JavaScript code to Python.
OpenAI API: beta.openai.com/
✏️ Course developed by @CybernaticoByNishant
ChatGPT with React: github.com/nishant-666/ChatGP...
OpenAI with React: github.com/nishant-666/Dall-E...
⭐️ Contents ⭐️
⌨️ (0:00) Introduction
⌨️ (4:01) Importing configuration and api keys
⌨️ (11:27) Creating the input and button
⌨️ (16:09) How to create an image
⌨️ (23:32) Getting the api key from the console
⌨️ (28:48) Setting up the menu items
⌨️ (36:14) Hovering options in the options
⌨️ (41:03) Importing the translated component
⌨️ (48:47) Setting options in a file
⌨️ (53:30) Finishing main function
🎉 Thanks to our Champion and Sponsor supporters:
👾 Nattira Maneerat
👾 Heather Wcislo
👾 Serhiy Kalinets
👾 Erdeniz Unvan
👾 Justin Hual
👾 Agustín Kussrow
👾 Otis Morgan
--
Learn to code for free and get a developer job: www.freecodecamp.org
Read hundreds of articles on programming: freecodecamp.org/news

Пікірлер: 151
@darren9678
@darren9678 Жыл бұрын
Thank you for posting such helpful content as always 💗
@equious8413
@equious8413 Жыл бұрын
Great tutorial, really simple implementation, lots of fun to play with!
@codewithguillaume
@codewithguillaume Жыл бұрын
Woooow! Thank you so much for this video. I'll start right away !
@ifstatementifstatement2704
@ifstatementifstatement2704 Жыл бұрын
I had that idea as well: ask chatGPT to program a chatGPT clone.
@abenjamin13
@abenjamin13 Жыл бұрын
Thank you 🙏 for posting this.
@CGMiVideos
@CGMiVideos Жыл бұрын
Very insightful. Weldone 👏👏👏
@nocopyrightgameplaystockvi231
@nocopyrightgameplaystockvi231 Жыл бұрын
The guy is super chilled. 🔥
@yoshikagarner6655
@yoshikagarner6655 Жыл бұрын
Very helpful! Thank you so very much!!! :)
@tarun7027
@tarun7027 Жыл бұрын
Thank you for sharing❤️
@amarisali4458
@amarisali4458 Жыл бұрын
Was waiting for FCC to put light on Chat GPT too and boom here it is !
@BeGhosting
@BeGhosting Жыл бұрын
Every “coder” is going to look at this video and say they made an AI tool 😂
@gulabchandgupta5486
@gulabchandgupta5486 Жыл бұрын
Hahaha😂😂😂😂
@tjr2152
@tjr2152 Жыл бұрын
Who cares?
@superduper6090
@superduper6090 Жыл бұрын
@@tjr2152 me
@Enjoyablewalks
@Enjoyablewalks Жыл бұрын
😂😂😂😂😂
@soraregareth
@soraregareth Жыл бұрын
Still better than them not attempting to code at all though right? Everyone starts somewhere.
@RAHULSHARMA-if4fs
@RAHULSHARMA-if4fs Жыл бұрын
Great work
@bubblelaber4909
@bubblelaber4909 Жыл бұрын
This is love ♥️
@neelampallinaveen7610
@neelampallinaveen7610 Жыл бұрын
It will will helpful like who are interested with angular
@user-dj6cm1cf6c
@user-dj6cm1cf6c Жыл бұрын
Thank you!
@nocopyrightgameplaystockvi231
@nocopyrightgameplaystockvi231 Жыл бұрын
I already tried the Image creator using Kivy. Worked really nice but sadly wasn't able to port it to Android 🌚.
@samiulhuda
@samiulhuda Жыл бұрын
Eagerly waiting to see a clone with Django
@siphokazee
@siphokazee Жыл бұрын
This is super coool😊
@simraankhatib2693
@simraankhatib2693 Жыл бұрын
Thank you.
@actionkey8042
@actionkey8042 Жыл бұрын
AWESOME
@kevinwikram1245
@kevinwikram1245 Жыл бұрын
Good work
@eurob12
@eurob12 Жыл бұрын
Very cool
@JeremyRefoia
@JeremyRefoia Жыл бұрын
super
@snowcatman
@snowcatman Жыл бұрын
Would be nice to have a non proprietary example close to gpt-3 as possible. For offline personal use. On your own pc machine on your own network. would love to see a video on that!
@shashankbhatnagar22
@shashankbhatnagar22 Жыл бұрын
you can't use something like chat gpt3 offline
@denizorsel1029
@denizorsel1029 Жыл бұрын
@@shashankbhatnagar22 Is that really the case though? I can locally use stable diffusion for instance with no external services required.
@shashankbhatnagar22
@shashankbhatnagar22 Жыл бұрын
@@denizorsel1029 my sensibilities say that gpt must be using the internet to pull out information and process it through NLP and deliver the output. It'll be crazy for it to have this much of data locally Stored somewhere. Stable diffusion can work like a regular software because it has limited output. That's what I think.
@user-wc1sm8cj8s
@user-wc1sm8cj8s Жыл бұрын
@@shashankbhatnagar22 agree to you dude, besides, that kind of AI requires tremendous amount of computing power, which an average home computer may not be capable of.
@jefflynch
@jefflynch Жыл бұрын
@@shashankbhatnagar22 I believe the model takes up "only" around 100GB (it was of course trained on much more data, but it is reduced to essentially an algorithm), so it would be possible to host locally. Processing power is another story.
@lawrencemathew3410
@lawrencemathew3410 Жыл бұрын
Nice
@AmericanDragon134
@AmericanDragon134 Жыл бұрын
This is fng amazing tutorial
@Colvin.crochet
@Colvin.crochet Жыл бұрын
How funny that I asked chatgpt how to make a clone of itself and it basically said "be smarter"
@estellebrady4383
@estellebrady4383 Жыл бұрын
I am very much new to this, so bare with me haha but first of all, do we know why at 1:49 why in line 1 for example that my useState would be blue, while his is red? Also, at 2:00 how does everything go from having a single quotation to a double quotation? Also, when he creates the .env file, I get a logo that has a gear, while his is something else. Do we know why this would happen? i also already have vs-code icons
@MrIbadanBoy
@MrIbadanBoy Жыл бұрын
I totally understand you. You don't have to worry about those.. Try to follow him exactly as he did, and you'll be fine. The points you raised differ, sometimes because you might be using a different OS so the icons and colors of the code may look different. You know you have an error when the Parr of the code shows a red line underneath or you simply get an error notification when you try to run it.. A proper look at the code and a few google searches on the error it shows will help improve your understanding.. Cheers!
@TechnoSavant
@TechnoSavant Жыл бұрын
I also do it very super
@carterzeng5756
@carterzeng5756 Жыл бұрын
Thanks for youtube CC to let me know what hes talking. Good tutorial anyway.
@makoado6010
@makoado6010 Жыл бұрын
haha... did u check the open-ai how much money want for the ai tokens?
@kevinlucas9905
@kevinlucas9905 Жыл бұрын
Yeeeeeeeaaaaaahhhhh!!!!!!
@BeGhosting
@BeGhosting Жыл бұрын
damn bro
@dimauasername
@dimauasername Жыл бұрын
How to disable Generate button while we’re waiting for picture? 19:50
@Sports-Made
@Sports-Made Жыл бұрын
This is cheaper than Chat gpt plus?
@mahendranath2504
@mahendranath2504 Жыл бұрын
Thank you so much ❤🫡👌👍👋👏🥳🤝🙏🏻🎊🎉🫰🏻😊
@PoojaSinha-ir3rw
@PoojaSinha-ir3rw Жыл бұрын
This code work on wix ?
@ulamss5
@ulamss5 Жыл бұрын
do it with Bloom, say no to proprietary half measures.
@Daniel-qo9uv
@Daniel-qo9uv Жыл бұрын
59:29 French translation have a missing word, what ChatGPT wrote: Quels sont les chambers que vous avez disposables. The correct version: Quels sont les chambers que vous avez __DE__ disposables.
@smartcat5989
@smartcat5989 Жыл бұрын
which languages are used in this video
@superduper6090
@superduper6090 Жыл бұрын
react js, a library/framework for javascript
@sacredgeometry
@sacredgeometry Жыл бұрын
So how to take the input of a text field and send it to an api then put that response into the dom? I mean thanks I guess. How to actually make a ChatGPT clone would be more interested if you explained how to actually make a chat gpt clone :D
@GhostsOfSparta
@GhostsOfSparta Жыл бұрын
Same thing in the video can be achieved by asking ChatGPT "write react code to use chat gpt api" They took our jobs!
@sacredgeometry
@sacredgeometry Жыл бұрын
@@GhostsOfSparta I mean yeah because its something that most developers could do in their sleep. Its not really an engineering task its a third party API consumption task with a basic UI thrown into the mix. If this is all you do in your job then maybe your job doesnt need to exist :D
@superduper6090
@superduper6090 Жыл бұрын
@@sacredgeometry you have no idea at all how hard it is to make an actual ai that has the same level of power that chatgpt does. If you actually thought it could be made in react, then maybe you should get better at developing and then comment on whether other peoples jobs are needed or not.
@sacredgeometry
@sacredgeometry Жыл бұрын
@@superduper6090 I actually do I am a software engineer and have written neural nets (from scratch) and trained language models albeit not ARs. If I had the time, budget and inclination I could make one. You know that react has nothing to do with that side of things right? So what makes you think anyone else thinks that? But ChatGPT has a front end which react could handle. What cloning means is copying something. We are not copying ChatGPT we are literally just using its api. Thats the contention here and if you are too stupid to understand that you are for sure too stupid for me to want to continue a conversation with.
@superduper6090
@superduper6090 Жыл бұрын
@@sacredgeometry Yes, I know that react has nothing to do with it, but why did you come here expecting to see it if you saw react in the title? its obvious that hes not going to show us how to create an actual gpt clone. And I really doubt you could actually make anything as good as chatgpt on your own, of course given an unlimited budget anything is possible but otherwise I really doubt it.
@neelampallinaveen7610
@neelampallinaveen7610 Жыл бұрын
Sir can you plz do with angular
@superduper6090
@superduper6090 Жыл бұрын
You should try and do it in angular, im sure it would be a fun project
@rubenverster250
@rubenverster250 Жыл бұрын
Dude... I can probably do this in Angular and I don't know Angular... RTFM
@codesoon9668
@codesoon9668 Жыл бұрын
20:00 what a screamer
@johnathan4185
@johnathan4185 Жыл бұрын
dont use my API key had me rolling xD
@PoliticalPanic
@PoliticalPanic Жыл бұрын
So now we have two chatgpts.
@elgustavo8117
@elgustavo8117 Жыл бұрын
What is the name of the color theme?
@_rtdp_
@_rtdp_ Жыл бұрын
I think it's one dark pro darker... I use this theme also...
@elgustavo8117
@elgustavo8117 Жыл бұрын
@@_rtdp_ Thanks 👍
@karthikeyanrm3446
@karthikeyanrm3446 Жыл бұрын
Is this video still valid - as they have made a pro version ?
@macsolutions
@macsolutions Жыл бұрын
Whenever I request for generating a new image i get 401 error. Can someone explain what is the problem.
@nomadybb1-66er7
@nomadybb1-66er7 Жыл бұрын
me too
@infotration2225
@infotration2225 Жыл бұрын
Really
@mosqutio88
@mosqutio88 Жыл бұрын
Question: What's the best method to hide API keys with React + Vite?
@zechariahhounwanou8462
@zechariahhounwanou8462 Жыл бұрын
in the .env file created in the root directory of your project
@rudy9546
@rudy9546 Жыл бұрын
@@zechariahhounwanou8462 Mine wouldn't find the .env variable . I just set it in the app.jsx is this a bad idea ?
@danieltian3422
@danieltian3422 Жыл бұрын
@@rudy9546 In general it's bad practice to hard code credentials in code because some one can take it and abuse it where you'd have to pay for usage that you aren't using.
@tan8067
@tan8067 Жыл бұрын
I need a lot of practice🥴
@laura9306
@laura9306 Жыл бұрын
Please note you will not be able to use openai without setting up a billing plan.
@sharmarajat
@sharmarajat Жыл бұрын
what about chatgpt server down everytime
@elonfc
@elonfc Жыл бұрын
Lol Andrej karpathy created the same tutorial yesterday
@elonfc
@elonfc Жыл бұрын
@@hyperadapted yes
@filynz
@filynz Жыл бұрын
Wow, please can I have the full source code? I will appreciate if you can let me have it
@superduper6090
@superduper6090 Жыл бұрын
make your own or follow along
@prashants5071
@prashants5071 Жыл бұрын
I think github links are in the description
@iamnimish
@iamnimish Жыл бұрын
getting a 400 error while clicking on the button
@iamnimish
@iamnimish Жыл бұрын
what to do.. anyone ?
@johnkim7783
@johnkim7783 Жыл бұрын
@@iamnimish I was able to resolve it by replacing env variable to an api variable
@Jmfufghf
@Jmfufghf Жыл бұрын
If open AI is so freaking intelligent it should already have my phone number and not ask for my personal information I'd like to try it but not at the cost of giving out my tracking device
@superduper6090
@superduper6090 Жыл бұрын
you could try using google voice, but then of course youd have to trust google with your data
@Jmfufghf
@Jmfufghf Жыл бұрын
@@superduper6090 I tried and voip numbers are blocked 🤬
@superduper6090
@superduper6090 Жыл бұрын
@@Jmfufghf so just sign up with your real number and it should work
@superduper6090
@superduper6090 Жыл бұрын
@@Jmfufghf or you could also try just buying a cheap burner phone specifically for these cases
@LazaroAlejo
@LazaroAlejo Жыл бұрын
7:36 Let me see if I know how to write the word generate, I don’t care the whole world see I stumbled in a single English word, my language (coding) is not from this world, I’m in the future 🔥🔥🔥
@developerjavalinux
@developerjavalinux Жыл бұрын
Hummm🤔
@CRYPTODUNIA.
@CRYPTODUNIA. Жыл бұрын
IS THAT API FREE OR PAID?
@lontongwho
@lontongwho Жыл бұрын
free until usage reached $18
@radubradu
@radubradu Жыл бұрын
Can we use AI to translate from whatever he's speaking to English? It would really help with the tutorial.
@NahidNouhan
@NahidNouhan Жыл бұрын
Ok finally my first comment!
@abdirashiidwiif
@abdirashiidwiif Жыл бұрын
💀✌
@saarza9991
@saarza9991 Жыл бұрын
Ah an Indian. The single most dominant race in a sector. Way to go 🥰🙏
@Catge
@Catge Жыл бұрын
Most dominant in using the street as a bathroom
@drood78
@drood78 Жыл бұрын
Who else is going to run the scam centers.
@ritiksingh1445
@ritiksingh1445 7 ай бұрын
​@@drood78U mean who is going to lead Google😈? 🇮🇳🇮🇳
@ritiksingh1445
@ritiksingh1445 7 ай бұрын
​@@CatgeYeah That's why 60% of doctors across world are indians. And btw that gmail account that u r using rn the ceo of that google is a Indian so think twice before writing anything stupid😑😑
@Catge
@Catge 7 ай бұрын
@@ritiksingh1445 okay Bangladesh > India
@ihorv44
@ihorv44 Жыл бұрын
it seems that the world do mad about ChatGPT
@erwinmatys
@erwinmatys Жыл бұрын
Just tell chatgpt to write a chatgpt clone
@BeGhosting
@BeGhosting Жыл бұрын
i am first
@m.fatihyldz8159
@m.fatihyldz8159 Жыл бұрын
"make a clone of chatgpt by using react" enter
@theelofiguy
@theelofiguy Жыл бұрын
1:10
@eotikurac
@eotikurac Жыл бұрын
beautiful accent ¬___¬
@NikhilKumar-wh9gi
@NikhilKumar-wh9gi Жыл бұрын
1st person to comment 🥳
@AdnanArch
@AdnanArch Жыл бұрын
1st comment 😁😁 and thanks to freecodecamp for provide such kind of great content to learn. ❤
@matbeedotcom
@matbeedotcom Жыл бұрын
Bruh you need a new voice over
@kevinmehta5264
@kevinmehta5264 Жыл бұрын
First
@thiagoleobons390
@thiagoleobons390 11 ай бұрын
this is not even close to a ChatGPT CLONE. Wheres the sidebar?
@caw5v
@caw5v Жыл бұрын
There is absolutely no reason to use react here lol
@yasmeenm6435
@yasmeenm6435 Жыл бұрын
What would you use instead
@BABABAKLOL
@BABABAKLOL Жыл бұрын
Bhai india se h kya hindi me bol
@Robytsu
@Robytsu Жыл бұрын
What a mess this tutorial was...
@rupenedu
@rupenedu Жыл бұрын
dont waste your time here this is really broing and this not really work .
@AlbertoVasquezOspina
@AlbertoVasquezOspina Жыл бұрын
That's the reason because i love FreeCodeCamps. 😍😍
@RAHULSHARMA-if4fs
@RAHULSHARMA-if4fs Жыл бұрын
Great work
@user-dj6cm1cf6c
@user-dj6cm1cf6c Жыл бұрын
Thank you!
OpenAI Embeddings and Vector Databases Crash Course
18:41
Adrian Twarog
Рет қаралды 348 М.
ChatGPT Functions - Full Tutorial for using OpenAI Functions
29:14
Adrian Twarog
Рет қаралды 79 М.
РАДУЖНАЯ ГОРКА 🌈😱
00:30
ВИОЛА 🐰
Рет қаралды 3,3 МЛН
PILIHLAH PASANGAN KAUS KAKI 🧦 MEMBERSIHKAN KAKI
00:17
One More Indonesia
Рет қаралды 95 МЛН
Иран ударил по израильскому аэропорту
00:14
TRT на русском
Рет қаралды 3,7 МЛН
Let's Build ChatGPT 2.0 with React JS and OpenAI on your PC!
1:02:23
Adrian Twarog
Рет қаралды 475 М.
How To Build Your Own AI With ChatGPT API
9:51
Web Dev Simplified
Рет қаралды 360 М.
Coding Tetris in JavaScript (HTML and CSS)
4:41
Speed Coding
Рет қаралды 7 М.
Learn React With This One Project
42:38
Web Dev Simplified
Рет қаралды 652 М.
Build and Deploy Your Own ChatGPT AI App in JavaScript | OpenAI, Machine Learning
1:01:47
Is ChatGPT actually useful for coding?
21:40
Web Dev Cody
Рет қаралды 341 М.
How To Use openAI API (ChatGPT) in React JS
9:45
intellisenseAI
Рет қаралды 25 М.
APIs for Beginners 2023 - How to use an API (Full Course / Tutorial)
3:07:07
freeCodeCamp.org
Рет қаралды 1,6 МЛН
РАДУЖНАЯ ГОРКА 🌈😱
00:30
ВИОЛА 🐰
Рет қаралды 3,3 МЛН