GithubHelp home page GithubHelp logo

ecupse / telegram-dalle-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from javitoro/telegram-dalle-bot

0.0 0.0 0.0 5 KB

This is a simple implementation of the OpenAI API, a Telegram bot which will generate an image using AI for the prompt you send to it.

License: MIT License

JavaScript 100.00%

telegram-dalle-bot's Introduction

Telegram DALL·E bot

GitHub GitHub issues GitHub forks

Introduction

This is a simple implementation of the OpenAI API, a Telegram bot which will generate an image using AI for the prompt you send to it using the command /image [prompt]. Like, for example, /image bots getting to the Moon.

Set-up guide

Getting keys

In order to use this bot yourself, you'll need to get two keys, one for the OpenAI API authorization and other one as a token for the Telegram bot. As for OpenAI, you can register and get your API key here. For the Telegram side, you can create a bot and get its token using @BotFather inside the app.

Setting up the environment

Once you've got both keys, create a .env file in the root of the project and then add the tokens there, the following way:

OPENAI_API_KEY="your token as string"
TELEGRAM_BOT_TOKEN="your token as string"

Save the file and remember adding it to your .gitignore if you're pushing the code, otherwise you'd be sharing your keys.

Running the bot

First, we need to install the dependencies in order for the bot to run correctly. From the root, just execute the following command.

npm install

That's it, we're ready to run the bot, just use this script:

npm run start

And that's all, you can now interact with your bot using Telegram.

telegram-dalle-bot's People

Contributors

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