Skip to content

hybridvamp/chatgptbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT Telegram Bot

License Issues Pull Requests

This is a Telegram bot that uses the OpenAI's GPT-3 model to answer questions and generate responses. The bot is written in Python and uses the Telethon library to interact with the Telegram API, and the OpenAI API to communicate with the GPT-3 model. It also uses the Telegraph API to create a Telegraph article of the response and sends the link to the user as a reply.

How to use

To use the bot, send your questions along with the /ask command. For example, if you want to ask "What is the weather today?", you should send the message "/ask What is the weather today?"

How to run

To run the bot, you need to have the following things:

  • A Telegram account and a bot token
  • An OpenAI API key (if you have more than one key the bot will select next key in case of usage exceed error)
  • A Telegraph API token
  • Python 3.8 or higher

Once you have these things, you can clone the repository and install the dependencies by running the following command:

  
  git clone https://github.com/hybridvamp/chatgptbot.git
  cd chatgptbot
  pip3 install -r requirements.txt
  

Then, you need to set the following environment variables:

Finally, you can run the bot by running the following command:

  python3 main.py

Contribution and Pull Requests

Contributions and Pull Requests are most welcome. If you have any suggestions or improvements, please feel free to open an issue or submit a pull request.

Contact

For any queries and support, you can contact me on Telegram at @hybrid_chat

About

trying to make a ChatGPT Telegram Bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published