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.
-
Clone the repository: git clone https://github.com/leop25/openai-telegram.git
-
Install the required packages: pip install -r requirements.txt
-
Set the required environment variables:
API_KEY
: Your OpenAI API keyBOT_TOKEN
: Your Telegram bot token
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.
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.