A lightweight Telegram bot that integrates with the DeepSeek API to process and respond to user queries intelligently.
- Interacts with users on Telegram
- Forwards queries to the DeepSeek API
- Sends back intelligent responses from DeepSeek
- Python 3.7 or higher
- A Telegram Bot Token
- A DeepSeek API Key and Endpoint
git clone https://github.com/your-username/deepseek-telegram-bot.git
cd deepseek-telegram-botpython3 -m venv venv
source venv/bin/activatepython -m venv venv
venv\Scripts\activateInstall the required libraries (including python-telegram-bot):
pip install -r requirements.txtOr manually install if no requirements.txt:
pip install python-telegram-bot requests python-dotenvSet the following environment variables either in your shell or in a .env file:
DEEPSEEK_API_KEY=your_deepseek_api_key
DEEPSEEK_API_ENDPOINT=https://your-deepseek-api-endpoint.com
TELEGRAM_BOT_TOKEN=your_telegram_bot_tokenYou can create a .env file in the project directory for automatic loading.
Simply run:
python bot.pyThe bot will start and listen for incoming messages on Telegram.
bot.py # Main bot logic
.env (optional) # Environment variables
README.md # Project documentation
requirements.txt # Python dependencies
User: "Summarize this article..."
Bot: "Here’s a summary from DeepSeek: ..."
- Modify
bot.pyto enhance behavior or add new features. - Leverage the full power of the python-telegram-bot library.
This project is licensed under the MIT License.
Feel free to fork, open issues, or submit pull requests to improve the bot!