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!
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!
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
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.
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
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.
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?
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.
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.
{ "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
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?
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.
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!
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!
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
hello pls reply. how do i give the bot a personality like for example i want it to talk like sherlock holmes
just tell it that, litterally "Try to talk like Sherlock Holmes"
Love your videos. Btw, strip() also remove
chars so you don't need a separate step.
Great video, any advice on how to test on an azure openai client, basically your api?
what the f i didnt even use the api before its on new gmail account it says i hae exceeded the limit of useasge
100 like is mine) thanks man for the helpful video.
Short, easy and well explained, congratulations for this video.
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.
hey, does it need billing
Do we have to subscribe to chat gpt plus ,to access gpt turbo 3.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
Thanks brother, true OG , watched many of your vids
Can someone pelase tell me how he has python in that preview? I can only use python in cmd prompt at the moment :(
Your channel is so underrated!!!
can you pass files to chatgpt this way?
How do I create a chatGPT chatbot with python tkinter?
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()
Thank you very much.Great content as always.
In my terminal it says that the api key is not in any directory
As this example shows It’s too slow to use it for e.g. speech to text conversion
and expensive
What you suggest to use? Other technologies from another companies? Just curious
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 ?
Nobody knows just learn
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.
Why not provide the code you have used?
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?
yes i am also only receiving this message. It has been 3 months since your comment. Did you find a solution?
Informational video as usaul. What is name of intro music?
Very nice Demo, I wanted to optimize oracle query, could you please suggest some good ideas to do so.
I got an error says that " module 'openai' has no attribute 'ChatCompletion' " Someone please help me!!!!!
Did you solve it?
@@JAGuy yes, the problem was i have the old python version, this library requires the latest one.
@@mohammadaqdas7998 how exactly do you check to make sure you have the newest version I updated pycharm but I still see the error
You can remove a few lines of code for the final example with the walrus operator (i love it): "while (user_message := input()) != 'quit':"
I'm waiting for it . Thx brother ❤❤
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.
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.
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
Man, this video was awesome thank you!
Thanks - great demo 😀
Very nice.
Thank you
tôi mún đc hướng dẫn file API_KEY tại tôi ko add đc
is not working anymore
Bro mogged me at the start
response['choices'][0]['message']['content'] --please explain this line
{
"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
THANK YOU SOOOOOOOO MUCH
good video thank you
Love ❤
This tutorial is deprecated
Cool!
good video
outdated now
🎉
As always I am one year late...
Better late than never!
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?
lol you can call it whatever you want, he mispelled it
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.
👍🙏👍🙏👍
Thx_.