Skip to content

A minimal, lightweight and simple telegram bot, built with chatgpt API to generate responses and images.

License

Notifications You must be signed in to change notification settings

SharafatKarim/openai-telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI Telegram Bot

A minimal, lightweight and simple telegram bot built with chatgpt API from OpenAI and python-telegram-bot. It can genrate text messages and images and can be used both personally or inside a group!

API used

  • OpenAI GPT-3.5 for chat response
  • DALL-E for image response

MIT License

openai-telegram

This project is also available with Telegraf library in Node.js (both servered or, serverless).

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

  • API_KEY

collect from your openai account. From the setting you can generate API key.

  • BOT_API

Telegram BOT_API can be generated from Bot father telegram bot.

Run Locally

Clone the project

  git clone https://github.com/SharafatKarim/openai-telegram

Go to the project directory

  cd my-project

Install dependencies

  pip install -r requirements.txt 

Run the bot

  python main.py

Deployment

This bot can deployed to web services like railway or heroku or any vps. For vps follow the above guide. Railway should work out of the box. Just fork this repository, fill up environment variables. As simple as that!

Screenshots

image

image

Authors

sr-tamim's Profilator SharafatKarim's Profilator

Contribution

Feel free to fork and open pull requests. Also you are very welcomes to apply new pathes or create a more advanced version of this project. Your imagination is your limits!

About

A minimal, lightweight and simple telegram bot, built with chatgpt API to generate responses and images.

Topics

Resources

License

Stars

Watchers

Forks

Languages