Recommand to use https://github.com/acheong08/ChatGPT, this repo also include login.
Sample code to create chatgpt bot on telegram
inspired by (acheong08)[https://github.com/acheong08/ChatGPT]
first update the telegram_token
by the your telegram bot token.
run the bot and input anything.
the bot will need the Bearer token (chatgpt), please refer the steps below.
if not token (chatgpt), will reply message to asking input, format as auth <auth token>
.
after input auth <auth token>
, the bot ready to communicate with chatgpt.
Go to https://chat.openai.com/chat and log in or sign up