Getting Started With OpenAI ChatGPT (GPT-3.5) API In Python | Tutorial For Beginners

preview_player
Показать описание
OpenAI has finally released the most anticipated ChatGPT model today, called "gpt-3.5-turbo". Unlike the GPT 3.0 models that work like a search engine, ChatGPT model tracks the conversation to create more useful outputs. In this tutorial, I will go through every single detail on how to get started with the newest OpenAI ChatGPT API in Python.

► Buy Me a Coffee? Your support is much appreciated!
-------------------------------------------------------------------------------------------
☕ Venmo: @Jie-Jenn

► Support my channel so I can continue making free contents
---------------------------------------------------------------------------------------------------------------

00:00 - Intro to OpenAI gpt 3.5 turbo model
00:34 - OpenAI GPT-3.5 Pricing difference vs GPT-3.0
01:51 - OpenAI GPT 3.5 models summary
03:03 - Sign up for an OpenAI account
03:29 - Create an OpenAI API Key
03:47 - Create Python script
04:15 - Install OpenAI Python package
04:27 - open.ChatCompletion library usage
11:00 - Track ChatGPT conversation
15:03 - Make the Python script runs like ChatGPT

#chatgpt #chatgptapi #openai #ai #python #gpt
Комментарии
Автор


I will be releasing more chatGPT related videos in the future, so don't forget to subscribe!

PS: I was incorrect regarding you cannot set a token limit with ChatCompletion model. In fact you can, by setting the "max_tokens" parameter.

jiejenn
Автор

From YouTube comment reply tutorials until now, you have kept up with the times, the generation of teenagers like me need your contribution, sir. 😊❤

JGVRP
Автор

Much appreciation, I decided to learn VS Code and Python (basics) a couple days ago so I could start playing with this API. Last time I cracked open any code was probably VBA (if you can call that code) Appreciate you taking the time to explain your process and some of the underlying pieces.

Update - your code worked perfectly and I know that: In the 2020 NBA Finals, 575 free throws were attempted by both teams combined over the 6 games. Thanks a ton!

toddwmac
Автор

I just finished building a python code that totally interactive without typing or reading text. you can use an local wakeup word(stays offline until you want to use it). then wakes up and uses ChatGPT-3.5-turbo. It remembers the previous conversations, you talk to it, and it answers back with speech. I want to add it to an interactive AI avatar if anyone can help with that. uses wireless microphone so I don't even need to be by the computer.

douglashilton
Автор

we need programmers like this. Thank you Jie Jenn

kontgaming
Автор

I have subscribe your channel bcoz Jenn cares about his commenters : )

HaidenSD
Автор

thankyou so much bro you explained it very clearly.

GokulBalajiGaming
Автор

"system" is supposed to instruct the model, send it before "user" message, no need to send it as an individual request.

bnglr
Автор

hi, how do u set if the api uses gpt3.5 or gpt 4 ? there is no setting when you generate the key as far as I can see... please help. cheers

DigitalSamTV
Автор

Thanks Jenn it works am using Pycharm. Does token have limitation? Bcoz i want to summarize abt 50, 000 words. So how do i increase the token or bypass limitation?

HaidenSD
Автор

Today was my first day of using python and i already made a discord bot that reads messages from a specified channel, sends those messages to chat gpt, and then sends chat gpt's response back to the original channel(i know it isn't much but it's my first day come on).

MilkstacheTV
Автор

my code is not working i just copied the script and nothing is happening is there a index.html file

carspam_nv
Автор

Hi, I'm successfully run your script in terminal!
however, i want to export the output, so can you maybe make another video tutorial how to use this on web browser, or maybe a gui app with parameters setting? thank you!

senjin
Автор

Thanks for sharing this. Just a quick note, on some lines the word 'conversation' was misspelled as covnersation.

toddd.
Автор

HI, thanks your shareing. When I follow your step and block in 9:30 . The fuction show : Invalid URL (POST /v1/chat/completions). I fond the solution to this problem is to change the model to engine, but it still not work. Could you help me ? This block me 2 days.

leehaen
Автор

Hey, how are you running whatever code you select in the currently open python interpreter?

dragonsaige
Автор

Do we yet know, if we could retain the existing model?

Can I add or change certain layers?

soumojitguhamajumder
Автор

Thank you so much! But I got his problem Additional properties are not allowed ('content:' was unexpected) - 'messages.2", could you tell me what would be the problem? Thanks a lot!

yuchengpeng
Автор

Is there anything special you need to do to get this to run just using "run pythin file"? If I run the whole code as a block it works but all hell breaks loose if I try to just click the |> button.

thedarkglovemusic
Автор

So, for a work the size of the KJB that contains about 780, 000 words, the cost would be somewhere around $1500? 🤔

JuanRamirez-dibl