Skip to content

This repository contains code for a Telegram bot that uses GPT-based language models to generate responses to user queries. It includes a Python script for creating a vector index based on a corpus of text files, and another script for running the Telegram bot. Users can add their own text files to the data folder and use the bot to generate respo

Notifications You must be signed in to change notification settings

Sultan-aj/GPT-Telegram-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GPT-Telegram Bot

GPT-Telegram Bot is a chatbot for Telegram that uses GPT-based language models to provide intelligent responses to user input.

Setup

To use GPT-Telegram Bot, follow these steps:

  1. Clone the repository to your local machine.
  2. Install the required Python packages by running pip install -r requirements.txt
  3. Set up a Telegram bot and obtain an API key. See Telegram's Bot API documentation for instructions.
  4. Create a .env file in the root directory of the project and add the telegram bot API to the following line:
TELEGRAM_BOT_API_KEY=<your-telegram-bot-api-key> 
  1. Open bot.py and add your Telegram API key:
TELEGRAM_API_KEY = os.environ.get("TELEGRAM_BOT_API_KEY")
  1. Open wrapper.py and add your OpenAI API key:
os.environ['openai_api_key'] = "ADD OPENAI API KEY" 
  1. Run python wrapper.py to create the vectorIndex.json file.
  2. Run python bot.py to start the Telegram bot.

Acknowledgements

  • OpenAI - for providing the GPT language model.
  • python-telegram-bot - for providing the Telegram bot API wrapper.

About

This repository contains code for a Telegram bot that uses GPT-based language models to generate responses to user queries. It includes a Python script for creating a vector index based on a corpus of text files, and another script for running the Telegram bot. Users can add their own text files to the data folder and use the bot to generate respo

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages