edoardob90 / telegram-chatgpt

Personal assistant powered by ChatGPT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

telegram-chatgpt

Personal assistant powered by ChatGPT as a Telegram bot. Uses the official OpenAI API.

Minimal setup

  • Create a Poetry environment and install the requirements
  • Obtain a (new) token for your bot via the @BotFather
  • Place your secrets in the .env file: TELEGRAM_BOT_TOKEN, OPENAI_API key, and the Telegram user id ADMIN_USER_ID of a user you want to be the bot's administrator
  • Create a file named .verify.json which contains the questions & answers to verify the users. The answer fields will be hashed at the first startup of the bot. The format should be the following:
[
  {"question":  "First Question",
  "answer":  "First Answer"},
  
  {"question":  "Second Question",
  "answer": "Second Answer"}
]
  • The bot can be started with a simple command like poetry run python main.py

Check out the official wiki of the python-telegram-bot library to know how and where to host this bot.

About

Personal assistant powered by ChatGPT


Languages

Language:Python 100.0%