drmhdh / openai-telegram

This is a simple Python program that uses the OpenAI API to generate text and images based on user input, and sends the results to a Telegram bot.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenAI Telegram Bot

This is a simple Python program that uses the OpenAI API to generate text and images based on user input, and sends the results to a Telegram bot.

Installation

  1. Clone the repository: git clone https://github.com/leop25/openai-telegram.git

  2. Install the required packages: pip install -r requirements.txt

  3. Set the required environment variables:

    • API_KEY: Your OpenAI API key
    • BOT_TOKEN: Your Telegram bot token

Usage

To run the bot, simply run the main.py script: python main.py

Once the bot is running, you can interact with it by sending messages to it on Telegram. Use the /text command followed by a prompt to generate text, or use the /image command followed by a prompt to generate an image.

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

This is a simple Python program that uses the OpenAI API to generate text and images based on user input, and sends the results to a Telegram bot.

License:MIT License


Languages

Language:Python 100.0%