Code Monkey home page Code Monkey logo

openai-telegrambot's Introduction

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!

openai-telegrambot's People

Contributors

sharafatkarim avatar isamaelfarah avatar sr-tamim avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.