A Telegram bot that combines DeepSeek R1 API for reasoning and OpenAI's GPT for responses, creating more thoughtful and context-aware conversations, making the overall usage much cheaper.
Heavily inspired by Doriandarko's RAT-retrieval-augmented-thinking
- Node.js (if running locally)
- Docker (if running containerized)
- Telegram Bot Token (from @BotFather)
- OpenAI API Key
- DeepSeek API Key
- Clone this repository
- Create a
.env
file with the following variables:
BOT_TOKEN="your_telegram_bot_token"
OPENAI_API_KEY="your_openai_api_key"
DEEPSEEK_API_KEY="your_deepseek_api_key"
SYSTEM_PREFIX="Optional custom system prompt"
docker-compose up -d
npm install
node bot.js
- Mention the bot (@your_bot_name) or reply to its messages in group chats
- Available commands:
/reset
- Start a new conversation/systemprefix <text>
- Set a new system prompt/help
- Show available commands
BOT_TOKEN
- Telegram Bot API tokenOPENAI_API_KEY
- OpenAI API keyDEEPSEEK_API_KEY
- DeepSeek API keySYSTEM_PREFIX
- Custom system prompt (optional)
Never commit your .env
file or expose your API keys publicly.
MIT