Coder Social home page Coder Social logo

openai-telegram's Introduction

openai-telegram

This is a Telegram bot that utilizes OpenAI API. At the moment you can use it for ChatGPT, image generation (dall-e) and voice message transcription (whisper).
I wanted to test both openai python library as well as python requests to connect to API.

Versions

openai_bot_v13.py - for python telegram bot library v13.x
openai_bot_v20.py - for python telegram bot library v20.x

Setup

Add your API keys for Telegram bot and OpenAI.

You want to limit the users that are allowed to use the bot, add the desired userID's in the list. There are several ways how you can find out your userID, but the easiest one is to use https://t.me/getidsbot on Telegram.
The same goes with allowed channels/groups. Add group IDs where you want to allow the usage of your bot.

Usage

To use ChatGPT, just enter a command /chat followed by a text in private chat with bot or on the channel where your bot is present. For example:
/chat explain quantum computing

For image generation, use /pic:
/pic black cat

For audio message transcription just forward the audio message to the bot (in a private chat)

Evgeni Semenov, [email protected]

openai-telegram's People

Contributors

evgeni-semenov avatar

Watchers

 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.