Skip to content

A telegram bot that combines DeepSeek R1 API for reasoning and OpenAI's GPT for responses

Notifications You must be signed in to change notification settings

deemkeen/rat-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAT-Chat

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.

Credits

Heavily inspired by Doriandarko's RAT-retrieval-augmented-thinking

Prerequisites

  • Node.js (if running locally)
  • Docker (if running containerized)
  • Telegram Bot Token (from @BotFather)
  • OpenAI API Key
  • DeepSeek API Key

Setup

  1. Clone this repository
  2. 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"

Deployment

Using Docker Compose (Recommended)

docker-compose up -d

Running Locally

npm install
node bot.js

Usage

  • 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

Environment Variables

  • BOT_TOKEN - Telegram Bot API token
  • OPENAI_API_KEY - OpenAI API key
  • DEEPSEEK_API_KEY - DeepSeek API key
  • SYSTEM_PREFIX - Custom system prompt (optional)

Security Note

Never commit your .env file or expose your API keys publicly.

License

MIT

About

A telegram bot that combines DeepSeek R1 API for reasoning and OpenAI's GPT for responses

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published