This is a Telegram bot that uses Claude AI to generate responses to messages.
- Create a Telegram bot using @BotFather
- Apply for a Anthropic API key.
- Run the bot (preferably as a Docker container) with the following environment variables:
ANTHROPIC_KEY
: Your Anthropic API keyTELEGRAM_TOKEN
: Your Telegram bot token
Here's an Docker compose example:
version: '3.5'
services:
claudegptbot:
image: h00s/claudegpt-telegram-bot
container_name: claudegptbot
stop_grace_period: 15s
restart: unless-stopped
environment:
- TELEGRAM_TOKEN=123456:abc
- ANTHROPIC_KEY=12345
/start
: Start the bot/hello
: Test the bot if it's working/new
: Start a new conversation (Claude will forget the previous conversation)
Any message sent to the bot will be sent to Claude and the response will be sent back to the user.