Тёмный

How to use the ChatGPT API with Python!! 

Nicholas Renotte
Подписаться 265 тыс.
Просмотров 511 тыс.
50% 1

Get notified of the free Python course on the home page at www.coursesfromnick.com
Sign up for the Full Stack course here and use RU-vid50 to get 50% off:
www.coursesfromnick.com/bundl...
Code: github.com/nicknochnack/ChatG...
Hopefully you enjoyed this video.
💼 Find AWESOME ML Jobs: www.jobsfromnick.com
Oh, and don't forget to connect with me!
LinkedIn: bit.ly/324Epgo
Facebook: bit.ly/3mB1sZD
GitHub: bit.ly/3mDJllD
Patreon: bit.ly/2OCn3UW
Join the Discussion on Discord: bit.ly/3dQiZsV
Happy coding!
Nick
P.s. Let me know how you go and drop a comment if you need a hand!
#machinelearning #python #datascience

Наука

Опубликовано:

 

5 мар 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 166   
@generichuman_
@generichuman_ Год назад
One thing that's nice to add is streaming, so that the words show up as they are being generated. This avoids the longer wait times for lengthy responses. Also, I've noticed that openai is still working out the kinks with their api's and some days you'll get a pretty high failure rate and have to retry a response. With streaming, you can set a reasonable timeout to try again ( usually if the first word hasn't arrived within 3 seconds, it's going to fail and hang indefinitely). If you don't have streaming, you have to wait as long as your longest possible response to retry which could be more than 10 seconds in some cases. Getting into the minutiae a little bit, but just some things I've discovered in my travels.
@pratikbawane997
@pratikbawane997 Год назад
Hi there! Can you tell me how to add streaming as you said above?!
@Ultimate-pb8hl
@Ultimate-pb8hl 11 месяцев назад
does this include getting responses like "permissions denied"?
@ULTRA5364
@ULTRA5364 5 месяцев назад
Awesome!
@KSATica
@KSATica Год назад
ChatGPT has been AMAZING the experience for me was priceless
@rayaneghilene5152
@rayaneghilene5152 Год назад
You re a lifesaver, I’ll be using it for my school project thanks 🙌
@eliedabelly3804
@eliedabelly3804 Год назад
I love how these videos - so short and direct it makes it so much simpler to follow thank you 🙏
@borntodoit8744
@borntodoit8744 Год назад
Is called dumbing it down for the masses. everyone thinks they are an expert till they hit a basic problem...
@n-0-1
@n-0-1 Год назад
I'm scraping all of the chat and teams log data from my company and training gpt with it. I will build a UI for my team members so that our private technical business questions that are asked frequently can be answered quickly.
@borntodoit8744
@borntodoit8744 3 месяца назад
I wish you would add more data.. how u implemented usecase: training using private data for private AI requires an instance of a model workflow: prompt + private data >chatbot >model (GPT LLM) >completion unless u have a local instance of model (GPT LLM) then your data is still going to the internet (to OpenAi 's GPT instance)... feb2024: your post is 10 months old (2023) I don't think running local model instances (llama, Gemini, GPT) were available to download & install locally
@Fghhhg8883
@Fghhhg8883 Год назад
Thank's for letting us know that openAI have released API for chatGPT. I wonder how many of my students already have a account
@NicholasRenotte
@NicholasRenotte Год назад
Anytime @Yrgen! Got some plans to do more content around it!
@RaviKant-ll6ck
@RaviKant-ll6ck 9 месяцев назад
Turnitin will catch the content generated by AI.
@ozgurgulerx
@ozgurgulerx Год назад
Hey Nicolas, enjoying your content! You are an inspiration! Just curious which final cut effect plugins you use? They make videos quiet enjoyable.
@NicholasRenotte
@NicholasRenotte Год назад
No plugins anymore, I do all the special effects in Adobe After Effects. Occasionally I use DeepGlow but all the custom stuff you see here is from AE
@Eric-demonic_saint
@Eric-demonic_saint Год назад
Awesome 😎 Thank you for sharing with us❤
@hiTocopter
@hiTocopter Месяц назад
What do you mean recently? The API has been available for years...
@pavankumarsettem1834
@pavankumarsettem1834 Год назад
Thank's for that. Can you make a video on explainability in ML models, I want to know why and how the models work.
@NicholasRenotte
@NicholasRenotte Год назад
You got it!
@settempavan9744
@settempavan9744 Год назад
Can you make a video on explainability in ML models such as visualisation techniques in CNN and more
@jhemp8446
@jhemp8446 Год назад
I’ve been doing a lot of cool stuff with the API. It’s incredibly easy to implement and find new ways to work with other libraries
@BigBoss-sm9xj
@BigBoss-sm9xj Год назад
Do you think it's worth the price?
@jhemp8446
@jhemp8446 Год назад
@@BigBoss-sm9xj a better question to ask, does it pay for itself and the answer is yes.
@MG-ih6po
@MG-ih6po Год назад
for the content, to make it more dynamic, have the user supply the prompt as a command line argument.
@borntodoit8744
@borntodoit8744 Год назад
is a programmatic example to show the open api not to show a scripting example for other usecases
@jerbky
@jerbky Год назад
Hey nic can you do a stock market (of your choice) data analysis
@NicholasRenotte
@NicholasRenotte Год назад
Damn 😅 Gotta work out better placement for the keyboard cam.
@NicholasRenotte
@NicholasRenotte Год назад
Also, lmk if any of you are coming to the forum I mentioned on LinkedIn! Would love to grab coffee with y'all!!
@ahmadelmassalkhi
@ahmadelmassalkhi 7 месяцев назад
i dont get the .ChatCompletion method i get .completion
@flexhshadow1990
@flexhshadow1990 Год назад
So I've made a tkinter app that had a prompt box and returns in a canvas with a save as need to clean it up need to learn to style more
@NicholasRenotte
@NicholasRenotte Год назад
Nice!! Awesome Josh!
@binodmalaka4508
@binodmalaka4508 Год назад
Thanks mate 🤍
@TerryLewisVideos
@TerryLewisVideos Год назад
Nice, thanks.
@NicholasRenotte
@NicholasRenotte Год назад
Cheers Terry!
@saishireesha2588
@saishireesha2588 4 месяца назад
Nice vlog ❣️Kannayya while seeing in mobile be like Enti nenu intha cute ga vunna 😊😅
@PassingTheDog
@PassingTheDog Год назад
Nice one Nicholas. One question, there's the same max characters in the output as in the web version? In this format of video seems longer.
@NicholasRenotte
@NicholasRenotte Год назад
What's the limit in the web version? It generated a whole page for me this morning!
@PassingTheDog
@PassingTheDog Год назад
@@NicholasRenotte It was like 4k characters. But I guess that now with the paid version it depends of the budget :')
@ko-Daegu
@ko-Daegu Год назад
That’s has to do with the mode 4k token is the gpt4 limit (I heard they will release a 32k token limit )
@akhilprazapati6148
@akhilprazapati6148 11 месяцев назад
Any full screen video for this please... Or any other source for this...
@big_bits
@big_bits Год назад
How does this work with continuity between messages?
@vikashmaurya2679
@vikashmaurya2679 Год назад
You need to store it, you can store it temporarily in a list and that way you can maintain continuity
@Compguy321
@Compguy321 6 месяцев назад
Can you share how to get just the output, and not the rest of the object?
@anshulbisht1350
@anshulbisht1350 5 месяцев назад
How many such requests can be made? Is there some limits in your plus subscription?
@DarrenTarmey
@DarrenTarmey Год назад
How does the results compaire to use gui connected to API or using the web app or in browser
@noviccen388
@noviccen388 Год назад
how much the pricing?
@soccerfooty2012
@soccerfooty2012 4 месяца назад
What is the benefit of using this instead of the default chat gpt webiste?
@user-ll3xd5dy3f
@user-ll3xd5dy3f 7 месяцев назад
What dependencies do I have to install before running this code?
@erickmacias5153
@erickmacias5153 Год назад
Can you make videos about fine tunning, and semantic search using gpt?🥺
@NicholasRenotte
@NicholasRenotte Год назад
You got it!
@CoconutPete
@CoconutPete Год назад
I'd like to see a simple example with PHP. I tried a month ago it never worked
@izaanmohammed3589
@izaanmohammed3589 6 месяцев назад
Do we need a chatgpt acount
@NicoleSummer8
@NicoleSummer8 6 месяцев назад
Awesome ❤👍💪👏😄
@gutsjoestar7450
@gutsjoestar7450 Год назад
what is the purpose of asking chatgpt questions in vscode
@manav-khadka
@manav-khadka Год назад
hey nicholas please made video on kaggle
@thespringer4257
@thespringer4257 11 месяцев назад
It's using GPT3.5 turbo, how do you use GPT4 instead?
@jenniarlet13
@jenniarlet13 6 месяцев назад
How can I feed it data to build a custom trained model ?
@ULTRA5364
@ULTRA5364 5 месяцев назад
That's a good question!
@ahmedmeftah731
@ahmedmeftah731 Год назад
you can litterly make an ai app that just runs chatgpt
@ahmedmeftah731
@ahmedmeftah731 8 месяцев назад
@noobody. no no, I mean an interface that works via ChatGPT-API
@ninefour11
@ninefour11 Год назад
is this script working without openai api key?
@user-ej3oe2cx6k
@user-ej3oe2cx6k Год назад
Can I make chatgpt helps me in prediction and classification with me model and links it with opencv I mean can I let the mission for chatgpt
@circuitcoder
@circuitcoder Год назад
Wait, I think this is actually pretty useful... * looks at Alexa echo dot * hehehehehe
@circuitcoder
@circuitcoder Год назад
For those who didn't get it, I want to try to make an Alexa skill which let's you communicate with chat gpt through Alexa
@nathanb2984
@nathanb2984 Год назад
How about image detection for onscreen images and algo? 😅😂
@trisha8066
@trisha8066 Год назад
I am trying to install openai to my file in visual studio code but its not working what do i do
@youtubercell9112
@youtubercell9112 8 месяцев назад
Would have to pay tho?
@josejose-je6xu
@josejose-je6xu 6 месяцев назад
Cool man
@JassyMon-wn4eh
@JassyMon-wn4eh 4 месяца назад
Can you pls do the same for llama 2
@CoBER-nc3el
@CoBER-nc3el Год назад
Hi there. Is it possible you could tell me if paying for the api key gives faster response times... for chatgpt api? Would appreciate your response.
@naitikjain9292
@naitikjain9292 Год назад
I think you cannot use this without paying, not sure tho
@RootiRBLX
@RootiRBLX 11 дней назад
Website or app name??
@harshlakhani4171
@harshlakhani4171 Год назад
Is there a way to use ChatGPT 4 on this?
@curesnow6493
@curesnow6493 5 месяцев назад
Is it free to use open ai APIs?
@czar82ro
@czar82ro Год назад
Nice
@cheaterflex3532
@cheaterflex3532 Год назад
This good content
@NicholasRenotte
@NicholasRenotte Год назад
Thanks a mil @jasser!!
@omar7613
@omar7613 Год назад
AWESOME
@NicholasRenotte
@NicholasRenotte Год назад
Cheers Omar!
@omar7613
@omar7613 Год назад
Bro! I wanna learn Reinforcement Learning, are your old videos still working? I heard that the libraries changed and the code doesn’t work from the comments.
@jensontmathew1584
@jensontmathew1584 6 месяцев назад
Can we use this to create chatbot? I am a noob to this field. Please answer anyone... 😊
@user-uy7kr5zq5s
@user-uy7kr5zq5s 9 месяцев назад
barack obama?!
@mayanksharma6622
@mayanksharma6622 9 месяцев назад
Will it give me the gpt4 answers?
@way2on
@way2on Год назад
chatgpt helped me try random generation of api keys until it works and now i have free chatgpt
@NicholasRenotte
@NicholasRenotte Год назад
LOL fr?
@way2on
@way2on Год назад
@@NicholasRenotte Yea it tries many combinations over and over everytime it returns an error, sometimes it works, sometimes it doesn't. So sorry for whoevers api key was used
@noahbuscuse5243
@noahbuscuse5243 Год назад
Why would I do this over using the playground
@gianmarcoguarnier2525
@gianmarcoguarnier2525 Год назад
hey Nick, I’ve been trying to build a chatbot using the official API but the engine don’t have memory. Is there a way to have such thing with the official api? Right now i m using the un official chatgpt wrapper but I need to login every time
@NicholasRenotte
@NicholasRenotte Год назад
Hmmm not too sure where the memory issue is? On ChatGPTs side or for your app? I'm doing a walkthrough of how to integrate it into Watson Assistant today. Started working on the Openapi spec yesterday. Should be out soon, I've been getting a ton of questions on it.
@gianmarcoguarnier2525
@gianmarcoguarnier2525 Год назад
@@NicholasRenotte Like: you can use the engine to generate answers as you showed but you can't generate a conversation instance through the API. Or can you? Looking foward for the video!
@miname.1802
@miname.1802 Год назад
this scares me a lot Nick
@NicholasRenotte
@NicholasRenotte Год назад
Curious? Why so @Mi Name?
@CDWRR
@CDWRR 5 месяцев назад
ChatCompletion line is not working properly
@rohitchanda8461
@rohitchanda8461 5 месяцев назад
Public API?
@yusuffbb
@yusuffbb Год назад
Hello. I installed that module but apikey methods not included. This way of codes gives me error. ModuleNotFoundError: No module named 'apikey' Do you have any suggestion?
@karim7658
@karim7658 Год назад
It's a local module he created himself to store his APIKEY I believe.
@CAGonRiv
@CAGonRiv Год назад
Eerie how time and time again that we align our projects lmfao
@NicholasRenotte
@NicholasRenotte Год назад
I posted on LinkedIn about an integration I built with it. I am getting slammmed with work now 😂
@kilianlindberg
@kilianlindberg 10 месяцев назад
only 5-6 month ago.. it was that recently🤔🤓
@johnabe1730
@johnabe1730 3 месяца назад
Do we need to generate a key from the open Ai website?
@Harsh-nv3xw
@Harsh-nv3xw Месяц назад
yes
@aadityasahoo6244
@aadityasahoo6244 Год назад
hey, im continuously getting this error openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details even though its a brand new key and i used the old key way back in feb can someone please help, thanks :D
@unknownyoutuber8
@unknownyoutuber8 Год назад
I am getting the same problem
@nikosnikos-fk6ct
@nikosnikos-fk6ct 10 месяцев назад
were is the dicreption
@sapyoahtml330
@sapyoahtml330 10 месяцев назад
it says no moduled name openai
@yanivkovler4056
@yanivkovler4056 7 месяцев назад
Why not just use chatgpt promptline?
@tejastidake6897
@tejastidake6897 9 месяцев назад
Is the API free?
@mahdiabbasinourabadi8554
@mahdiabbasinourabadi8554 Год назад
BOOOM
@randomstuffty
@randomstuffty 9 месяцев назад
where's code
@jessicabrus6549
@jessicabrus6549 10 месяцев назад
I need help
@FitVerse-oc8vy
@FitVerse-oc8vy 10 месяцев назад
hello me to developer and ı have an question; what is gpt-4 engine name
@FitVerse-oc8vy
@FitVerse-oc8vy 10 месяцев назад
please help me
@youssefultr
@youssefultr Год назад
it says You exceeded your current quota, please check your plan and billing details you are so lucky you got it for free man
@asmaamohamedmagdhelali5610
@asmaamohamedmagdhelali5610 3 месяца назад
Me too
@stutitomar6230
@stutitomar6230 2 месяца назад
What did you do next?
@user-lz3cz2zc4w
@user-lz3cz2zc4w Год назад
Ты не пробовал из какой нибудь локальной модели которая полностью доступна в общем доступе, сделать чат?
@NicholasRenotte
@NicholasRenotte Год назад
Not yet most of the stuff has been with paid APIs unfortunately. Closest was probably the live stream I did with BLOOM.
@user-lz3cz2zc4w
@user-lz3cz2zc4w Год назад
@@NicholasRenotte Sorry, I'm from Russia and I meant this. Would you like to use a public local model to create a dialog neural network similar to GPTchat. Are you planning this??
@ahmedsherif6195
@ahmedsherif6195 Год назад
0:00
@sivasaran_s
@sivasaran_s 5 месяцев назад
Not working
@kayodeolanrewaju5459
@kayodeolanrewaju5459 Год назад
would you need internet connection before it generates the output or it does it like that
@imadbenmadi
@imadbenmadi 11 месяцев назад
is this Api is free
@janarthanan1716
@janarthanan1716 2 месяца назад
Bro how to buy api keys in open ai
@Ts18762
@Ts18762 23 дня назад
You can get the free credit and can generate one without buying
@HafsaHareem-in4vu
@HafsaHareem-in4vu Год назад
Is there any method to take user input as message?
@Reficul999
@Reficul999 Год назад
U can create a tkinter and use an Entry
@crossses
@crossses Год назад
Yeah easily so put this content: input("What is your proompt?")
@abetterfuture4787
@abetterfuture4787 Год назад
"Cannot import name APIKEY from apikey" O________O I did pip install apikey and it went through, but the code still doesn't run. What gives?
@luischronos
@luischronos Год назад
bruh...
@abetterfuture4787
@abetterfuture4787 Год назад
@@luischronos Help a newb out?
@mukithasan9684
@mukithasan9684 4 месяца назад
Is there anyway to get an api for free use for learning ?
@nobodythenobody9779
@nobodythenobody9779 23 дня назад
That api is already free
@fin1225
@fin1225 Год назад
There will be a leck of programming job's in the future better start with electrical engineering.
@Yazan_Majdalawi
@Yazan_Majdalawi Год назад
That'll be affected as well, not that much further from programming jobs
@parallellinesmeetatinfinity
This man have Something wrong in his Neck 😢😢😢😢😅
@OkiDoki181818
@OkiDoki181818 Год назад
Is this really chat gpt, or is this gpt? Big difference. The one is a fixed price monthly, the other costs credits. Its misleading if its gpt and not chatgpt
@antongromek4180
@antongromek4180 Год назад
Nowadays they need computers to say absolutely nothing?🤯
@13deshmukhayaancoa93
@13deshmukhayaancoa93 5 месяцев назад
Is this free?
@nikosnikos-fk6ct
@nikosnikos-fk6ct 10 месяцев назад
how to make Minecraft in python import Minecraft run yay
@whitedevilcreations5676
@whitedevilcreations5676 5 месяцев назад
How to get API key ?
@blackhunter89300
@blackhunter89300 3 месяца назад
you hvae to pay
@preetpatel292
@preetpatel292 Год назад
I would rather use ChatGPT to ask it how to use ChatpGPT APIs 🤭
@dsvbdgbdfs
@dsvbdgbdfs Год назад
Sure buddy, if you want the less advanced text-davinci-002 model
@JakubSK
@JakubSK Год назад
You don’t
@LordDSP3
@LordDSP3 8 месяцев назад
I'm keep getting error that api is invalid or exhausted quota... Is it paid?
@tusharrao74
@tusharrao74 8 месяцев назад
It used to be free but it's paid now
@LordDSP3
@LordDSP3 8 месяцев назад
@@tusharrao74 that's sad, you know any api / model / lib to make a simple chat bot
@alangiovannysanchez5368
@alangiovannysanchez5368 6 месяцев назад
I had the same issue. Bit of a bummer it's no longer free.
@xBaphometHx
@xBaphometHx Год назад
Is this the pay to use API?
@gianmarcoguarnier2525
@gianmarcoguarnier2525 Год назад
you have three months free
@NicholasRenotte
@NicholasRenotte Год назад
Yup!
@lifewithG-bengs
@lifewithG-bengs Год назад
Is it free or paid?
@NicholasRenotte
@NicholasRenotte Год назад
This one is paid @Ogunkoya! It seems pretty reasonable though $2 per million words.
@chevvvv
@chevvvv Год назад
@@NicholasRenotte how do I start this? And where can I get an API key?
@aniakaleta101
@aniakaleta101 8 месяцев назад
does this guy get on your nerves or is it just me
@NicholasRenotte
@NicholasRenotte 8 месяцев назад
nah, gets on my nerves as well
@isumitd9586
@isumitd9586 4 месяца назад
Dont know anything about it
@Eddie-gb3bn
@Eddie-gb3bn 3 месяца назад
What’s the point of this, why not just use the GUI?
@TLM-Nathan
@TLM-Nathan 10 месяцев назад
I fail to see how this is anything other than pointless. Why waste time writing all that code when you could just go to chatgpt and ask there? Can we maybe get a practical use for this?
@Eddyi1
@Eddyi1 9 месяцев назад
wtf. This can be used to automatize a lot of processes.
@seekyboi23
@seekyboi23 Год назад
This is not a ChatGPT
Далее
I Discovered The Perfect ChatGPT Prompt Formula
6:27
Просмотров 945 тыс.
Ozoda - JAVOHIR ( Official Music Video )
06:37
Просмотров 1,1 млн
How I'd Learn AI in 2024 (if I could start over)
17:55
Просмотров 808 тыс.
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Просмотров 1,5 млн
How to Code a AI Trading bot (so you can make $$$)
35:09
Create A Python API in 12 Minutes
12:05
Просмотров 560 тыс.
How ChatGPT Built My App in Minutes 🤯
8:28
Просмотров 1,9 млн
Python 101: Learn the 5 Must-Know Concepts
20:00
Просмотров 1 млн
RAG from the Ground Up with Python and Ollama
15:32
Просмотров 23 тыс.
Непробиваемый телевизор 🤯
0:23