Skip to content

πŸš€ An AI-powered Telegram bot using DeepSeek AI for intelligent and context-aware responses. support multiple deepseek mode and interact with telegram bot.

Notifications You must be signed in to change notification settings

forhunny/telegram-deepseek-bot

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DeepSeek Telegram Bot

This repository provides a Telegram bot built with Golang that integrates with DeepSeek API to provide AI-powered responses. The bot supports streaming replies, making interactions feel more natural and dynamic.
δΈ­ζ–‡ζ–‡ζ‘£

πŸš€ Features

  • πŸ€– AI Responses: Uses DeepSeek API for chatbot replies.
  • ⏳ Streaming Output: Sends responses in real-time to improve user experience.
  • 🎯 Command Handling: Supports custom commands.
  • πŸ— Easy Deployment: Run locally or deploy to a cloud server.

πŸ€– Usage Example

usage video

πŸ“Œ Requirements

πŸ“₯ Installation

  1. Clone the repository

    git clone https://github.com/yourusername/deepseek-telegram-bot.git
    cd deepseek-telegram-bot
  2. Install dependencies

     go mod tidy
  3. Set up environment variables

     export TELEGRAM_BOT_TOKEN="your_telegram_bot_token"
     export DEEPSEEK_TOKEN="your_deepseek_api_key"

πŸš€ Usage

Run the bot locally:

 go run main.go
 or
 go run main.go -telegram_bot_token=telegram-bot-token -deepseek_token=deepseek-auth-token

Use docker

  docker pull jackyin0822/telegram-deepseek-bot:latest
  docker run -d -e TELEGRAM_BOT_TOKEN="telegram-bot-token" -e DEEPSEEK_TOKEN="deepseek-auth-token" --name my-telegram-bot  jackyin0822/telegram-deepseek-bot:latest

βš™οΈ Configuration

You can configure the bot via environment variables:

Variable Name Description
TELEGRAM_BOT_TOKEN Your Telegram bot token
DEEPSEEK_TOKEN DeepSeek Api Key
CUSTOM_URL custom deepseek url

CUSTOM_URL

If you are using a self-deployed DeepSeek, you can set CUSTOM_URL to route requests to your self-deployed DeepSeek.

Command

/mode

chose deepseek mode, include chat, coder, reasoner
aa92b3c9580da6926a48fc1fc5c37c03

/balance

aa92b3c9580da6926a48fc1fc5c37c03

/clear

clear all of your communication record with deepseek. this record use for helping deepseek to understand the context.

/retry

retry last question.

/help

aa92b3c9580da6926a48fc1fc5c37c03

Deployment

Deploy with Docker

  1. Build the Docker image

     docker build -t deepseek-telegram-bot .
  2. Run the container

      docker run -d -e TELEGRAM_BOT_TOKEN="telegram-bot-token" -e DEEPSEEK_TOKEN="deepseek-auth-token" --name my-telegram-bot telegram-deepseek-bot 

Contributing

Feel free to submit issues and pull requests to improve this bot. πŸš€

License

MIT License Β© 2025 jack yin

About

πŸš€ An AI-powered Telegram bot using DeepSeek AI for intelligent and context-aware responses. support multiple deepseek mode and interact with telegram bot.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 91.7%
  • Shell 6.7%
  • Dockerfile 1.6%