Telegram bot for DALL-E 3 image generation
Top 71.8% on sourcepulse
This project provides a Telegram bot that leverages Bing's DALL-E 3 image generation capabilities. It's designed for Telegram users who want to create images from text prompts directly within their chats, offering features like prompt rewriting via GPT or Gemini and image-to-prompt generation.
How It Works
The bot interacts with users via Telegram, accepting text prompts or image uploads. It utilizes Bing's image creation service, requiring users to provide their Bing cookies for authentication. For enhanced prompt generation, it integrates with OpenAI's GPT or Google's Gemini APIs, necessitating separate API keys and configurations. The core functionality relies on parsing user messages, calling the appropriate backend service (Bing Image Creator, OpenAI, or Gemini), and returning the generated image or rewritten prompt.
Quick Start & Requirements
pip install -r requirements.txt
followed by python tg.py '<tg_token>' '<bing_cookie>'
. Docker and Fly.io deployment options are also available.bing.com/images/create
using Edge or Chrome).openai-python
compatibility issues with Python 3.12).prompt_pro
) and Google Gemini API key (for prompt_gem
).Highlighted Details
startsword
, prompt:
, or prompt_gem:
.Maintenance & Community
The project is open for contributions, with a recommendation to use black
for code formatting before submitting pull requests.
Licensing & Compatibility
The project does not explicitly state a license in the README. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
The project explicitly states compatibility issues with Python 3.12 due to the openai-python
library. Using the bot in public groups might decrease efficiency due to message processing overhead.
1 year ago
1 day