{"id":48100337,"url":"https://github.com/derleiti/ai-twitch-bot","last_synced_at":"2026-04-04T15:42:22.813Z","repository":{"id":292587521,"uuid":"981335954","full_name":"derleiti/ai-twitch-bot","owner":"derleiti","description":"An AI Twitch bot that can communicate your play through screenshots","archived":false,"fork":false,"pushed_at":"2026-03-24T07:47:23.000Z","size":316056,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-25T09:30:12.194Z","etag":null,"topics":["ai","bot","llm","python","screenshot","streaming","twitch"],"latest_commit_sha":null,"homepage":"https://ailinux.me","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derleiti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-05-10T21:48:15.000Z","updated_at":"2026-03-24T07:47:28.000Z","dependencies_parsed_at":"2025-07-10T11:56:38.416Z","dependency_job_id":null,"html_url":"https://github.com/derleiti/ai-twitch-bot","commit_stats":null,"previous_names":["derleiti/ai-twitch-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/derleiti/ai-twitch-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derleiti%2Fai-twitch-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derleiti%2Fai-twitch-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derleiti%2Fai-twitch-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derleiti%2Fai-twitch-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derleiti","download_url":"https://codeload.github.com/derleiti/ai-twitch-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derleiti%2Fai-twitch-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31403960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","bot","llm","python","screenshot","streaming","twitch"],"created_at":"2026-04-04T15:42:22.723Z","updated_at":"2026-04-04T15:42:22.795Z","avatar_url":"https://github.com/derleiti.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI-Twitch-Bot 🎮🤖\n\nEin intelligenter Twitch-Chatbot mit Bildanalyse, Spielkommentar, Ollama-Integration und Realtime-Interaktion.\n\n---\n\n## 🚀 Features\n\n- 📡 **Twitch Chatbot (IRC)**  \n  Liest Nachrichten im Livestream-Chat und antwortet kontextbezogen.\n\n- 🧠 **KI-Integration mit Ollama (lokale Modelle)**  \n  Nutzt lokale LLMs zur Generierung von Texten, Spielkommentaren und Antworten.\n\n- 🖼️ **Bildanalyse mit Vision-Modell (LLaVA, CLIP etc.)**  \n  Analysiert Screenshots aus dem Stream und erkennt Spielszenen oder Objekte.\n\n- 🎙️ **Live-Kommentare**  \n  Kommentiert automatisch laufende Spielszenen mit Zephyr-Stil-Texten.\n\n- 🔁 **Automatischer Reload via `entr` beim Live-Coding**  \n  Neustart des Bots bei jeder Codeänderung – perfekt für schnelles Dev-Feedback.\n\n- 🧩 **Modulares Python-System**  \n  Strukturierter Code mit Threads, Events, Logs, Game-State-Management.\n\n- 🔐 **.env-basierte Konfiguration**  \n  Alle Zugangsdaten, Tokens und API-Keys in einer `.env` Datei.\n\n---\n\n## 📦 Installation\n\n```bash\ngit clone https://github.com/derleiti/ai-twitch-bot.git\ncd ai-twitch-bot\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n## Auth / SSO (Google + WordPress) Quickstart\n1. `pip install -r requirements.txt`\n2. Set in `.env`: `SITE_URL`, `AUTH_BASE_URL=http://localhost:8088`, `JWT_SECRET` (32+), `JWT_ISS`, `JWT_AUD`.\n   - Google: `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`\n   - WordPress (optional): `WP_WELL_KNOWN` (+ `WP_CLIENT_ID`, `WP_CLIENT_SECRET`)\n   - Local HTTP: set `COOKIE_SECURE=false` (or use HTTPS)\n3. Run: `uvicorn auth_service:app --host 0.0.0.0 --port 8088`\n4. Login flow: open `/auth/login/google` → complete → `GET /auth/me` returns `{email, roles}`.\n\n### Link Twitch account\n- Create code:\n  `curl -sX POST $AUTH_BASE_URL/api/link/code -H 'content-type: application/json' -d '{\"twitch_username\":\"YOUR_NAME\"}'`\n  → returns `{code,url}`\n- While logged in (cookie set), open the URL to link.\n- Internals: stores provider=`twitch`, provider_sub=`\u003ctwitch_username\u003e`.\n\n## Screenshot Archive \u0026 Vision Q\u0026A\n- Configure `.env`:\n  `SCREENSHOT_DIR=/root/zephyr/screenshots`\n  `SCREENSHOT_MAX=100`\n  `VISION_SOURCE_LABEL=screen@workstation`\n- Bot commands:\n  - `!shots [n]` → list recent `sid · HH:MM:SS · source · filename`\n  - `!shot (latest|sid)` → short vision summary\n  - `!askshot (latest|sid) \u003cquestion\u003e` → targeted, one-paragraph answer (links/shortcut symbols, etc.)\n- Outputs are single-line, sanitized, ≤ 500 chars.\n\n### Test the ring buffer\nRun `pytest -q tests/test_screenshot_ringbuffer.py` — it seeds \u003e MAX items, asserts only the newest MAX remain and dedupe works.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderleiti%2Fai-twitch-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderleiti%2Fai-twitch-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderleiti%2Fai-twitch-bot/lists"}