Logo Lanfrica

ermizamr/ai-tg-bot

Domain:

education

Record type:

software
Creator:
erm
Host:
an AI-powered Telegram bot for space, STEM, and Ethiopian tech learners. It uses prompt engineering and orchestration to deliver context-aware, helpful responses via a Groq/OpenAI-compatible API. The bot features owner-only project diary tools, public portfolio support, and persistent memory with Supabase integration. # The Spaceship Accelerator (Public Bot) A public Telegram bot that acts as a twin of Ermi's personal AI co‑pilot, focused on space, STEM, and Ethiopian tech learners. Identity and scope: - Creator: **ERMI** (Ermiyas Misiker / Ermi Zamr). - Public role: serves as ERMI's public portfolio assistant for projects, links, and mission. - Scope focus: **space science + technology**. ## Files - `PROFILE.md` — public info about Ermi and the bot's mission. - `bot.py` — Telegram bot logic. - `rocket_diary.json` — auto-created project diary storage for owner updates. - `project_memory.json` — compact AI-maintained memory (phase, priorities, blockers). - `public_state.json` — public disclosure settings controlled by owner instructions. - `chat_sessions.json` — per-chat recent session turns for context-aware replies. - `owner_memory.json` — saved owner notes outside the rocket project context. - `requirements.txt` — Python dependencies. - `.env` — local secrets (copy from `.env.example`). ## Setup 1. Create a Telegram bot via BotFather and get a token. 2. Create `.env`: ```env TELEGRAM_BOT_TOKEN=your_bot_token_here OWNER_TELEGRAM_ID=your_numeric_telegram_user_id AI_API_BASE_URL=optional_for_future AI_API_KEY=optional_for_future LLAMA_API_KEY=your_groq_key LLAMA_API_BASE_URL=api.groq.com LLAMA_MODEL=llama-3.1-70b-versatile SUPABASE_URL=your_project_id.supabase.co SUPABASE_SERVICE_ROLE_KEY=your_service_role_key SUPABASE_TABLE=bot_memory ``` 3. Install dependencies: ```bash pip install -r requirements.txt ``` 4. Run the bot: ```bash python bot.py ``` The bot calls a Groq/OpenAI-compatible chat endpoint via `LLAMA_API_BASE_URL` using `LLAMA_API_KEY`. ## Supabase Backend (Recommended for Ephemeral Hosts) If you run on a free tier host where local files may reset, configure Supabase so bot memory persists. Create this table in Supabase SQL editor: ```sql create table if not exists public.bot_memory ( key text primary key, payl …