Allows to launch your Telegram bot in a few minutes to communicate with AI models via OpenRouterā .
3.3K
This project allows you to launch your Telegram bot in a few minutes to communicate with free and paid AI models via OpenRouterā , or local LLMs, for example, via LM Studioā .
Note
This repository is a fork of the [openrouter-gpt-telegram-bot](https://github.com/deinfinite/openrouter-gpt-telegram-bot) project, which adds new features (such as switch current model and `Markdown` formatting in bot responses) and optimizes the container startup process.
Register with OpenRouterā and get an API keyā .
Create your Telegram bot using @BotFatherā and get its API token.
Get your telegram id using @getmyid_botā .
Tip
When you launch the bot, you will be able to see the IDs of other users in the log, to whom you can also grant access to the bot in the future.
To run locally on Windows or Linux system, download the pre-built binary (without dependencies) from the releasesā page.
mkdir openrouter-bot
cd openrouter-bot
.env file and fill in the basic parameters:# OpenRouter api key
API_KEY=
# Free modeles: https://openrouter.ai/models?max_price=0
MODEL=deepseek/deepseek-r1:free
# Telegram api key
TELEGRAM_BOT_TOKEN=
# Your Telegram id
ADMIN_IDS=
# List of users to access the bot, separated by commas
ALLOWED_USER_IDS=
# Disable guest access (enabled by default)
GUEST_BUDGET=0
# Language used for bot responses (supported: EN/RU)
LANG=EN
The list of all available parameters is listed in the .env.exampleā file
docker run -d --name OpenRouter-Bot \
-v ./.env:/openrouter-bot/.env \
--restart unless-stopped \
lifailon/openrouter-bot:latest
The image is build for amd64 and arm64 (Raspberry Pi) platforms using docker buildxā .
git clone https://github.com/Lifailon/openrouter-bot
cd openrouter-bot
docker-compose up -d --build
Content type
Image
Digest
sha256:ea37e4b6bā¦
Size
9.3 MB
Last updated
about 1 year ago
docker pull lifailon/openrouter-bot