GithubHelp home page GithubHelp logo

neurolena / ok-gpt Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 1.12 MB

Ok, GPT is a simple telegram bot to send voice messages to ChatGPT and get outputs. Requires your own OpenAI API key (and hence a paid subscription) to work

License: Other

Python 81.26% Makefile 11.39% Dockerfile 7.35%

ok-gpt's Introduction

Ok, GPT

Ok, GPT is a simple telegram bot to send voice messages to ChatGPT and get outputs. Requires your own OpenAI API key (and hence a paid subscription) to work.

Installation

Create a new Telegram bot with BotFather bot

  • Start a new conversation with the BotFather.
  • Send /newbot to create a new Telegram bot.
  • When asked, enter a name for the bot.
  • Give the Telegram bot a unique username. ...
  • Copy and save the Telegram bot's access token for later steps.

Get OpenAI API key

Set up your own OpenAI account. Visit https://platform.openai.com/account/api-keys in your OpenAI account to create a new API key.

Set up API keys for the bot

The bot requires some API keys to run. There are two ways of providing them:

  • environment variables. Provide the env variables listed in template.env. This option is more convenient for a cloud installation.
  • .env file in the project root. You should manually create it. I do not provide my own .env file because of security reasons, but I put template.env as a template for the keys required. This option is better suited for a local installation.

Cloud installation

For most clouds, it should be sufficient to just push the git repo and let them build everything for you. This, for example, works for Railway, Heroku, and others. The repo already has the Dockerfile and Makefile provided.

So all you need is to set up the API keys as described above.

Local installation

Set up Python environment

make env
source venv/bin/activate

Run the bot

./venv/bin/python ./src/app.py

Use Ctrl+c to stop the bot.

Enjoy!

ok-gpt's People

Contributors

dsvolk 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.