Skip to content

hlibr/telegram-mini-llm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightweight Python Telegram bot for LLM chatting with user separation and multiple session support

  • bot.py
  • requirements.txt
  • .env.example

What it supports:

  • LLM chat over Telegram
  • Separate session lists per Telegram user
  • Independent message history per session
  • Session switching
  • Session creation
  • Session renaming
  • Current session lookup

Commands:

  • /start
  • /help
  • /new [name]
  • /sessions
  • /use <session_id>
  • /rename <session_id>
  • /current

Implementation notes:

  • Uses sqlite3 for lightweight persistence
  • Stores:
    • users
    • sessions
    • messages
  • Uses an OpenAI-compatible backend via env vars:
    • TELEGRAM_BOT_TOKEN
    • OPENAI_API_KEY
    • OPENAI_MODEL
    • optional OPENAI_BASE_URL

Run steps:

  1. Install deps: pip install -r requirements.txt
  2. Copy env template and fill values: cp .env.example .env
  3. Start bot: python3 bot.py

Made by Codex, GPT-5.4

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages