This repository contains a Telegram bot (flat file layout) built with python-telegram-bot + LangChain/LangGraph.
- Python 3.10+ (recommended 3.11)
- A Telegram bot token from @BotFather
- An OpenAI API key
git clone https://github.com/Carshell/gadalka.git
cd gadalkaFrom the repo root:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txtCreate your local .env
copy .env.example .envThen edit .env and set:
OPENAI_API_KEYBOT_API
Optional:
OPENAI_MODEL(default:gpt-4.1-mini)TARO_URLNUMEROLOGY_URLURL_TIMEOUT_SECONDS(default:15)
python main.pyYou should see:
🤖 Bot is running...
Then open Telegram and send /start to your bot.
- SQLite database file is created automatically:
users.db - If you change
.env, restart the bot.