Skip to content

sacconazzo/telegram-llm-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Telegram LLM Chat Bot (Node.js + Ollama)

This is a lightweight Telegram bot written in Node.js that lets you chat with a local Large Language Model (LLM) using the Ollama API.
Messages are streamed and updated in real time, and the bot supports session resets and restricted access via chat ID.


🚀 Features

  • 🔁 Live streaming of model output with dynamic Telegram message updates
  • 🧠 Per-user memory (in-memory session context)
  • 🛑 /start command to reset chat history
  • 🔒 Access control: restrict bot to specific chat IDs
  • ⚙️ Configurable model, update rate, and API endpoint

📦 Requirements

  • Node.js ≥ 16
  • Ollama installed and running locally (or access to a remote Ollama server)
  • Telegram Bot Token from @BotFather

📁 Setup

  1. Clone the repo
git clone https://github.com/sacconazzo/telegram-llm-chat.git
cd telegram-llm-bot
  1. Configure
nano .env
  1. Install and run
yarn install
yarn start

About

Telegram LLM Chat Bot

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors