• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

Create your own Chatbot ChatGPT in Python

AnonyViet by AnonyViet
January 2, 2023
in Tips
0

Lately, there’s probably no one who doesn’t know the AI’s name ChatGPT then eh? In addition to the surprise and admiration at an extremely intelligent AI that can answer anything, even the code, there is also a little fear. The fear is because now we can clearly see how dangerous AI is to the job opportunities of many occupations. Of course, there is also the IT industry. But there are always two sides to the problem. When the doctor was born, the magician went to practice. That is the law of competition and self-elimination of the market from time immemorial. This is also a great opportunity for you to look at yourself, gain new knowledge, upgrade your level so that you are not rejected by this market.

How to create Chatbot using ChatGPT in python

Talking on the sidelines is probably enough. Mainly so that you don’t panic about your future. The focus of today’s article is that I will show you how to create a Chatbot using ChatGPT in python. You do not need to log in to OpenAI’s website, just go to your Website to be able to communicate with the chat bot.

Prepare

  1. First, you need Create a ChatGPT account.
  2. Next is the account Ngrokfor those of you who want to put your bot on the internet for others to use.
  3. And finally Python and pip.

How to install

Step 1: You go to the website of ChatAPI. Ask it any question.

Step 2: Press F12 and go to tab Application. In the menu on the left, select Cookies > First item and find the cookie named “__Secure-next-auth.session-token”. You copy that cookie code somewhere else to use later.

Create your own Chatbot ChatGPT in Python 11

Step 3: Clone the repo I made available to my computer with the command:

git clone https://github.com/ellyx13/Chatbot-ChatGPT-Python.git

Step 4: Install the necessary python libraries:

pip install -r requirements.txt

Create your own Chatbot ChatGPT in Python 12

Step 5: Open file pyChatbotGPT.py and paste the cookie code you just saved earlier into the session_token variable.

Create your own Chatbot ChatGPT in Python 13

Step 6: Run the python file with the command:

python pyChatbotGPT.py

Create your own Chatbot ChatGPT in Python 14

It will create a url for you to use on localhost, the default will be the port 7860. You open the url and this is the result.

Create your own Chatbot ChatGPT in Python 15

The principle of operation of this bot is that it will open the chatgpt website with the chrome browser. Submit the content of the question you enter on the chatbot page. Then get the answer on chatgpt that returns the chatbot.

Create your own Chatbot ChatGPT in Python 16

If you want to put the bot on the internet, follow the steps below.

How to put bots on the internet

Step 1: Load ngrok about the machine. Configure token api. You can see the tutorial here.

Step 2: Enter the command: ngrok http 7860. Ngrok will give you a forwarding url to your local port 7860. You just need to give this link to others to use the bot.Create your own Chatbot ChatGPT in Python 17

So that’s it then. But this way will have a disadvantage that many people using the bot at the same time will sometimes have errors.

Create your own Chatbot ChatGPT in Python 18

Now no need to log in to chatgpt, just go to your Web site provided by ngrok, you can communicate with ChatGPT. This is also a way for you to share your ChatGPT account without fear of losing your Password.

The article achieved: 4.2/5 – (4 votes)

Tags: ChatbotChatGPTcreatePython
Previous Post

9 things to absolutely avoid when using Tor

Next Post

Cách Chơi và Hack Game Tiệm Lẩu Đường Hạnh Phúc (iOS và Android)

AnonyViet

AnonyViet

Related Posts

10 languages ​​for web programming should learn in the isolation season
Tips

10 languages ​​for web programming should learn in the isolation season

June 16, 2025
Ruby vs Python: Where is the better language for application programming
Tips

Ruby vs Python: Where is the better language for application programming

June 15, 2025
Instructions for health drive health check on your computer
Tips

Instructions for health drive health check on your computer

June 14, 2025
PHPSOUND 6.2 – Code to build social networks to share music
Tips

PHPSOUND 6.2 – Code to build social networks to share music

June 13, 2025
How to detect and prevent email monitoring from others
Tips

How to detect and prevent email monitoring from others

June 12, 2025
8 free tools to security when programming software
Tips

8 free tools to security when programming software

June 11, 2025
Next Post
Cách Chơi và Hack Game Tiệm Lẩu Đường Hạnh Phúc (iOS và Android)

Cách Chơi và Hack Game Tiệm Lẩu Đường Hạnh Phúc (iOS và Android)

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

From Ho Chi Minh City to London: How Global Investors Use Bow Miner to Efficiently Minine Cryptocurrencies

From Ho Chi Minh City to London: How Global Investors Use Bow Miner to Efficiently Minine Cryptocurrencies

June 17, 2025
How to activate Adaptive Power on iOS 26 to save battery

How to activate Adaptive Power on iOS 26 to save battery

June 17, 2025
How to adjust the time to postpone the alarm iOS 26

How to adjust the time to postpone the alarm iOS 26

June 16, 2025
10 languages ​​for web programming should learn in the isolation season

10 languages ​​for web programming should learn in the isolation season

June 16, 2025
From Ho Chi Minh City to London: How Global Investors Use Bow Miner to Efficiently Minine Cryptocurrencies

From Ho Chi Minh City to London: How Global Investors Use Bow Miner to Efficiently Minine Cryptocurrencies

June 17, 2025
How to activate Adaptive Power on iOS 26 to save battery

How to activate Adaptive Power on iOS 26 to save battery

June 17, 2025
How to adjust the time to postpone the alarm iOS 26

How to adjust the time to postpone the alarm iOS 26

June 16, 2025
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

From Ho Chi Minh City to London: How Global Investors Use Bow Miner to Efficiently Minine Cryptocurrencies

From Ho Chi Minh City to London: How Global Investors Use Bow Miner to Efficiently Minine Cryptocurrencies

June 17, 2025
How to activate Adaptive Power on iOS 26 to save battery

How to activate Adaptive Power on iOS 26 to save battery

June 17, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET 23win https://kubet88.yoga/ KUBET BK8 Bj88

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET 23win https://kubet88.yoga/ KUBET BK8 Bj88

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply