Skip to content

adarshmarvel22/Tele_Bot_Akasr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

telebot_GPT_3.5_Turbo

Prerequisites

To follow this tutorial, we will need:

  • Python 3.7 or higher
  • A Telegram account and a smartphone
  • An OpenAI account and an API key

Telegram setup:

  1. search for botfather

  2. /newbot

    • chatgpt88
    • chatgpt88_bot

    Now click on the url

AIogram docs

https://docs.aiogram.dev/en/latest/

How to run the code

  1. Clone this repository or download the zip file
  2. Create a virtual environment and activate it
  3. Install the dependencies using pip install -r requirements.txt

    Or alternatively to the above two steps you can run init_setup.sh by running the following command in your terminal-

    bash init_setup.sh
  4. Create a .env file in the root directory and add your OpenAI API key and Telegram BOT TOKEN as follows:
OpenAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TOKEN=xxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  1. Run python src/chatgpt.py to start the bot
  2. Open Telegram and search for your bot username
  3. Start a conversation with your bot and enjoy!

Releases

No releases published

Packages

No packages published

Languages