Skip to content

abvld/gpt-tg-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💬 gpt-tg-bot - personal ChatGPT Telegram bot (Telegram API and OpenAI API)

Run your personal ChatGPT bot for Telegram using the OpenAI API. The bot is using "gpt-3.5-turbo" model.

Features

Token usage count

The bot extracts token usage statistics from the model's responses, and calculates the total value of the current chat based on the price on the site ($0.002/1K tokens).

Copyable code blocks

One-click code copypaste from code blocks.

Persistent storage

The bot uses the local pickle data file storage to save messages in currently active chats.

Preserved context

The model has access to previous messages in the currently active chat, preserving the context.

⚙️ Installation guide

  1. Export your OpenAI and Telegram API keys.
export OPENAI_API_KEY=YOUR_OPENAI_API_KEY
export TELEGRAM_API_TOKEN=YOUR_TELEGRAM_API_KEY
  1. Install the requirements
pip install -r requirements.txt
  1. Launch the bot
python -m gpt_tg_bot

📄 Disclaimer

This project is using APIs from OpenAI and Telegram. The developers of this project are not responsible for any damages, losses, or legal issues that may arise from the use of this software.

This project is not affiliated with or endorsed by OpenAI or Telegram in any way. The developers of this project do not claim ownership of any intellectual property associated with OpenAI or Telegram. The APIs used in this project are subject to the terms and conditions set forth by OpenAI and Telegram, respectively.

Users of this project are solely responsible for complying with the terms and conditions set forth by OpenAI and Telegram. The developers of this project do not assume any liability for any violations of these terms and conditions.

About

Run your personal ChatGPT bot for Telegram using the OpenAI API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages