Skip to content

azoway/chatgpt-telegram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔮 ChatGPT Telegram Bot by nodejs

This is a nodejs code for creating a Telegram bot that uses the ChatGPT API to generate responses to user messages.

Installation:
git clone https://github.com/azoway/chatgpt-telegram-bot
cd chatgpt-telegram-bot
npm install
vi index.js
node index.js
Usage:
  1. Obtain a Telegram bot token from BotFather and replace the value of telegram_bot_token with your token.
  2. Obtain an API key for the ChatGPT API and replace the value of apiKey with your key.
  3. Optionally, change the group_name variable to specify a different name for your bot's command prefix (default is /gpt).
  4. Modify the allowedUserIds array to include the IDs of the Telegram users and groups that are allowed to interact with your bot.
  5. Run the following command to start the bot: node index.js
  6. Send a message to your bot in Telegram to initiate a conversation. You can use the /reset command to clear the conversation history and start over.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published