Тёмный

Use OpenAI's ChatGPT in Python 

NeuralNine
Подписаться 358 тыс.
Просмотров 90 тыс.
50% 1

Today we learn how to use OpenAI's ChatGPT in Python.
OpenAI Platform: platform.openai.com/
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
🐍 The Python Bible Book: www.neuralnine.com/books/
💻 The Algorithm Bible Book: www.neuralnine.com/books/
👕 Programming Merch: www.neuralnine.com/shop
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine.com/
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/NeuralNine
🎙 Discord: / discord
🎵 Outro Music From: www.bensound.com/

Наука

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

 

6 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 66   
@IzUrBoiKK
@IzUrBoiKK Год назад
2 years ago, i started learning python through your channel... Now i was searching for tutorials of chatgpt api with but was finding it hard to follow anyone. But is was really easy ans nostalgic for me because of your video. Good luck bro!
@veroverobrian
@veroverobrian Год назад
Coming as a C/C++/Java dev, learning Python from you is super helpful. I recognize every modality of my known languages, and seeing it in Python is just so nice to learn alongside. Many thanks!
@ricardo.alves.campos
@ricardo.alves.campos Год назад
Short, easy and well explained, congratulations for this video.
@paulthomas1052
@paulthomas1052 Год назад
Thanks - great demo 😀
@bloodywolftr
@bloodywolftr Год назад
Thank you very much.Great content as always.
@giacomoferrari5624
@giacomoferrari5624 Год назад
Thanks brother, true OG , watched many of your vids
@tahlmilburn3565
@tahlmilburn3565 Год назад
Love your videos. Btw, strip() also remove chars so you don't need a separate step.
@rrahll
@rrahll Год назад
100 like is mine) thanks man for the helpful video.
@farabihbk
@farabihbk Год назад
I'm waiting for it . Thx brother ❤❤
@MateusMeurer
@MateusMeurer Год назад
Man, this video was awesome thank you!
@sahilsagwekar
@sahilsagwekar Год назад
Your channel is so underrated!!!
@mtmanalyst
@mtmanalyst 10 месяцев назад
Very nice. Thank you
@ishratalikhan1231
@ishratalikhan1231 8 месяцев назад
Very nice Demo, I wanted to optimize oracle query, could you please suggest some good ideas to do so.
@akhiluniyal9455
@akhiluniyal9455 Год назад
Do we have to subscribe to chat gpt plus ,to access gpt turbo 3.5?
@D4narchy
@D4narchy Год назад
You can remove a few lines of code for the final example with the walrus operator (i love it): "while (user_message := input()) != 'quit':"
@bill123f2
@bill123f2 Год назад
In my terminal it says that the api key is not in any directory
@BLACKDREAMIO
@BLACKDREAMIO 10 месяцев назад
what the f i didnt even use the api before its on new gmail account it says i hae exceeded the limit of useasge
@dmk_weaver
@dmk_weaver Год назад
Thanks! I always receive the error message that I exceeded my current quota. I'm sure I didn't. I have just created a new key and have not asked any questions since. Is anybody also experiencing this issue?
@julianhank1267
@julianhank1267 8 месяцев назад
yes i am also only receiving this message. It has been 3 months since your comment. Did you find a solution?
@MuhammadYasir-uc9xt
@MuhammadYasir-uc9xt 2 месяца назад
I have a project in python language which is a Plan text editor. I want to integrate it with open AI using API for the some purposes which are content suggetions, vocabulary suggetions, spell checker, grammar checker. kindly help me with it.
@YogeshKumar-kr1ke
@YogeshKumar-kr1ke Год назад
THANK YOU SOOOOOOOO MUCH
@DebarghaSaha-zj5lp
@DebarghaSaha-zj5lp Месяц назад
Hello. Is it necessary to use api key for this?
@benjialexander5850
@benjialexander5850 10 месяцев назад
Imagine creating code with chatgpt integrated in the program that could check and trouble shout problems with code that you asked it to create for more refined and better performance, what if it could even come up with program ideas to fix a problem then develop it and even install it onto sum thing like a raspberry pie???? this is an exiting age indeed
@chaselsantos
@chaselsantos 9 месяцев назад
good video thank you
@ItsPrussia
@ItsPrussia Месяц назад
hey, does it need billing
@sushantpawar3703
@sushantpawar3703 Год назад
Informational video as usaul. What is name of intro music?
@kernelpanic2927
@kernelpanic2927 Год назад
Cool!
@aduesh5120
@aduesh5120 Год назад
hello pls reply. how do i give the bot a personality like for example i want it to talk like sherlock holmes
@ingenieroriquelmecagardomo4067
just tell it that, litterally "Try to talk like Sherlock Holmes"
@snehitvaddi
@snehitvaddi Год назад
Why not provide the code you have used?
@chooyanghwee3525
@chooyanghwee3525 Месяц назад
Bro mogged me at the start
@ajimustapha7943
@ajimustapha7943 4 месяца назад
can you pass files to chatgpt this way?
@farzinkhaledi4394
@farzinkhaledi4394 Год назад
What do you think of the future of the Ai? Do you think it will take over the programmes world or not? And is it worth spending time to learn coding ?
@Brukrex
@Brukrex Год назад
Nobody knows just learn
@AK-zz9ok
@AK-zz9ok Год назад
The world of programming will definitely undergo significant changes due to AI, but I believe it's still definitely worth learning how to code. After all, we still need people to build the AIs.
@fangaohua
@fangaohua Год назад
good video
@IronSnipEdits
@IronSnipEdits 7 месяцев назад
Love ❤
@scotthjackson5651
@scotthjackson5651 5 месяцев назад
the code in this video doesn't work with the new version of the python openai library :( the new version changed basically everything shown in this video
@VerticalBase
@VerticalBase Год назад
How do I create a chatGPT chatbot with python tkinter?
@KubaGacek-oy8uw
@KubaGacek-oy8uw 6 месяцев назад
gotch YA : from openai import OpenAI from tkinter import * root = Tk() root.title("Chat GPT") def get_response(): user_input = message_entry.get() API_KEY = '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' client = OpenAI(api_key=API_KEY) response = client.chat.completions.create( model="gpt-3.5-turbo", messages=[ {"role": "user", "content": user_input}, ] ) text_content = response.choices[0].message.content chat_history.insert(END, " User: " + user_input) chat_history.insert(END, " Chat GPT: " + text_content) message_entry.delete(0, END) chat_history = Text(root) chat_history.pack() message_entry = Entry(root,width=50) message_entry.pack() send_button = Button(root, text="Ask", command=get_response, bg="blue", fg="white") send_button.pack() root.mainloop()
@Hazza0001
@Hazza0001 Год назад
🎉
@gergohorvath2538
@gergohorvath2538 Год назад
As this example shows It’s too slow to use it for e.g. speech to text conversion
@scarysticks66
@scarysticks66 Год назад
and expensive
@imangalinurkamalov5479
@imangalinurkamalov5479 10 месяцев назад
What you suggest to use? Other technologies from another companies? Just curious
@WondrousHello
@WondrousHello Год назад
If you’re providing the entire chat log as context when having a conversation, will all previous messages count towards token usage? Just thinking that every new message becomes increasingly expensive.
@bluekeybo
@bluekeybo Год назад
From their website: "Prices are per 1,000 tokens. You can think of tokens as pieces of words, where 1,000 tokens is about 750 words." Yes, if you send the history, that counts towards your tokens.
@midprogramming
@midprogramming 11 месяцев назад
That's correct. Finding a way to summarize the conversation and passing that in for substituting memory is probably going to be your best bet
@user-cw7ym2nx9g
@user-cw7ym2nx9g 6 месяцев назад
tôi mún đc hướng dẫn file API_KEY tại tôi ko add đc
@deusopus
@deusopus Год назад
i just used chatgpt to write the code for me!
@JAGuy
@JAGuy Год назад
Well what was the prompt
@angelus806
@angelus806 Год назад
is not working anymore
@mohammadaqdas7998
@mohammadaqdas7998 Год назад
I got an error says that " module 'openai' has no attribute 'ChatCompletion' " Someone please help me!!!!!
@JAGuy
@JAGuy Год назад
Did you solve it?
@mohammadaqdas7998
@mohammadaqdas7998 Год назад
@@JAGuy yes, the problem was i have the old python version, this library requires the latest one.
@JAGuy
@JAGuy Год назад
@@mohammadaqdas7998 how exactly do you check to make sure you have the newest version I updated pycharm but I still see the error
@satishchekuri7664
@satishchekuri7664 Год назад
response['choices'][0]['message']['content'] --please explain this line
@jananirajendran1571
@jananirajendran1571 8 месяцев назад
{ "choices": [ { "finish_reason": "stop", "index": 0, "message": { "content": "The 2020 World Series was played in Texas at Globe Life Field in Arlington.", "role": "assistant" } } ], "created": 1677664795, "id": "chatcmpl-7QyqpwdfhqwajicIEznoc6Q47XAyW", "model": "gpt-3.5-turbo-0613", "object": "chat.completion", "usage": { "completion_tokens": 17, "prompt_tokens": 57, "total_tokens": 74 } } This is the structure of the response
@philtoa334
@philtoa334 10 месяцев назад
Thx_.
@ventiladorbueno1846
@ventiladorbueno1846 Год назад
👍🙏👍🙏👍
@FushigiMigi
@FushigiMigi Месяц назад
outdated now
@mikilmku1554
@mikilmku1554 11 часов назад
This tutorial is deprecated
@eviehartman2895
@eviehartman2895 Год назад
New to Python here: Am I the only one who's bothered by the fact that "response" is spelled "respone" in this video? Is that actually how it's supposed to be spelled?
@MichaelShingo
@MichaelShingo Год назад
lol you can call it whatever you want, he mispelled it
@Imenigmars
@Imenigmars 5 месяцев назад
He did spell it wrong, but it doesn't matter because he spelled it the same way when he used it again in the print line. If he had spelled it "repone = blah blah", and then done print(response), he would have gotten an error.
Далее
The OpenAI (Python) API | Introduction & Example Code
23:46
Build Anything With ChatGPT, Here’s How
1:24:05
Просмотров 1 млн
26 Incredible Use Cases for the New GPT-4o
21:58
Просмотров 787 тыс.
Python Automation with ChatGPT
1:14:05
Просмотров 270 тыс.
EXCLUSIVE: Torture Testing GPT-4o w/ SHOCKING Results!
22:00
Two GPT-4os interacting and singing
5:55
Просмотров 2,9 млн
Let's build GPT: from scratch, in code, spelled out.
1:56:20
Claude 3.5 Deep Dive: This new AI destroys GPT
36:28
Просмотров 554 тыс.
Use OpenAI's API for Free
7:36
Просмотров 26 тыс.
Что стало с Windows Phone?
0:43
Просмотров 307 тыс.
How to Soldering wire in Factory ?
0:10
Просмотров 13 млн