Create a Python GPT Chatbot - In Under 4 Minutes

preview_player
Показать описание
Today I'm going to be showing you guys how you can make a python chatbot using OpenAI and ChatGPT in JUST 5 MINUTES!

🎬 Timestamps⏱️
00:00 | Installing OpenAI
00:32 | Getting an API Key
00:53 | Writing The Bot
03:01 | Testing The Bot

◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️

◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️

⭐️ Tags ⭐️
- Tech with Tim
- Chatbot
- Openai

⭐️ Hashtags ⭐️
#chatbot #python #5minutetutorial
Рекомендации по теме
Комментарии
Автор

I didn't even imagine building a Chatbot, however simple it is, is so easy. Thanks Tim for opening up my mind.

xkdejwg
Автор

As beginner who has been struggling with different methods of having a user exit a program or loop, and having used various ways of doing so, I really loved the idea of defining options in a list like that. It might be super obvious now that I have seen it, but what a great little snippet of code - I am definitly bringing it with me going forwards.

ChannelMantle
Автор

Love this! Would love to see more in-depth vids about function calling, deployment and chatbot use-cases for businesses. Keep it up!

GeobotPY
Автор

Thanks for breaking it down in under 4 minutes. This tutorial is incredibly helpful!

AIDummy
Автор

But this requires a paid plan. Probably worth mentioning.

christianbjerregaard
Автор

Why I get an exceeded quota limit if I have got just errors? Moreover it seemd ChatCompletion doesn't exist and I should turn back to openai version o.28. How I sort it?

armandoruggeri
Автор

Thank you very much for this video. It will make my work much easier. I am making a script that will take your voice, convert it to text, run it through ChatGPT, and then throw it into Text To Speech.

strudelman
Автор

You gotta love it when only outdated youtube tutorials are your only source of doing something and the creator never says it outdated

fortnitegaminggrandma
Автор

This was awesome I would love to see some content about deploying the ai's on different platforms

Olurii
Автор

I've searched for stuff like this when I've discovered chatGPT and thinking that I can improve my virtual assistant.
Now I can give my virtual assistant some new neurons to provide some information directly.
Thanks a lot!!

AndreiDante
Автор

So it's not a conversation, every time it's just a prompt and a response, because the chat doesn't remember previous posts. So I added a few lines of code to upgrade this:
"
import openai

openai.api_key = "paste your key"


def chat_with_gpt(chat_log):
response = openai.ChatCompletion.create(model='gpt-3.5-turbo',
messages=chat_log
)
return


chat_log = []
# Remembering more posts is more expensive
n_remembered_post = 2


if __name__ == "__main__":
while True:
user_input = input("You: ")
if user_input.lower() in ['quit', "exit", "bye"]:
break

chat_log.append({'role': 'user', 'content': user_input})

if len(chat_log) > n_remembered_post:
del

response = chat_with_gpt(chat_log)
print("Chatbot:", response)
chat_log.append({'role': "assistant", 'content': response})
"

JanKowalski-dmvr
Автор

Hello, I have a problem because I have the key but it shows me that I have exceeded my current amount of available resources on OpenAI and I haven't even used it. Is it possible to have this without providing a credit card?

krzysztofmydowski
Автор

Really appreciate this video! The only problem I ran into is that the chatbot doesn't remember the context of the conversation. Its like creating a new chat every time you input something

NateYaquinto
Автор

Hi I got an error like this -"import openai" could not be resolved pylance(reportmissingimports)[ln1, col8]

hanshusyed-lqng
Автор

Thanks Tim for making everything easier for us

HamedEmine
Автор

Hi, in the meantime congratulations for the video, I wanted to ask you some questions for a project that I would like to realize. 1) I would like to create an AI always with python, but customize it, give it a name for example, 2) How could I make sure that he remembers the information I give him? For example, that they remember my name or my date of birth? 3) All this of course I would like to pass in a text to talk to talk to him, and turn him into a friend, Thank you in advance if you will answer me :)

mupo
Автор

Hello sir, my command prompt isn’t functioning correctly, even though my code matches yours. How can I achieve the same output as you? Help me !

sanjanakashimath
Автор

Hello, I'm facing an issue where I can't import the OpenAI library. I have Python installed correctly and it's up-to-date. I also have the API key, but I'm unable to install the OpenAI library. Does anyone have a solution?

GreenAnonText
Автор

I was considering designing a skill system using chat gpt to create random skills based on character actions. You could have chat gpt respond with .json style skills, titles, etc based on player actions and achievements.

alexcroome
Автор

Hi Tim, this tutorial has been really helpful and I wanted to make this myself too, can you give me the name of the software you are working on? Thank you.

mrghost
visit shbcf.ru