This repository contains a Telegram bot built using the aiogram
framework, which leverages OpenAI's GPT model to provide AI-powered responses in Telegram chats.
- AI-Powered Chat: Integrates with OpenAI's GPT model to provide intelligent responses.
- Asynchronous Execution: Built with asynchronous Python, ensuring non-blocking operations.
- Ease of Use: Simple commands to interact with the bot and get AI-generated responses.
To run this bot, you need the following Python packages: ./requirements.txt
-
Clone the repository:
git clone https://github.com/mohammadabidhafiz1294/chatgpt-tele-bot.git cd chatgpt-tele-bot
-
Install dependencies: Make sure you have Python 3.8+ installed. Then, install the required Python packages using pip:
pip install -r requirements.txt
-
Set up environment variables: Create a
.env
file in the root directory and add your Telegram bot token and OpenAI API key:TELEGRAM_TOKEN=your_telegram_token OPENAI_API_KEY=your_openai_api_key
-
Run the bot:
python bot.py
After running the bot, it will be active in your Telegram bot. You can interact with it by sending messages, and it will respond using the GPT model.
Contributions are welcome! Please fork the repository and submit a pull request for any feature enhancements, bug fixes, or improvements.
This project is licensed under the MIT License. See the LICENSE file for more details.
This README.md
should provide clear instructions and information for anyone looking to understand, set up, and contribute to the project. Let me know if you need any changes!