metadata
title: Babble
emoji: 📊
colorFrom: gray
colorTo: pink
sdk: docker
app_port: 7860
app_file: app.py
pinned: false
short_description: Babble Telegram Bot
Babble
Telegram AI character bot backend demo.
Runtime
This Space runs as a Docker Space for FastAPI webhook reliability. The container starts:
uvicorn app:app --host 0.0.0.0 --port 7860
The Gradio landing demo is optional and mounted by the FastAPI app when Gradio is available. The Telegram webhook does not depend on Gradio.
Character Menu
Babble now ships with persona presets, a custom character builder, and per-session memory.
Telegram commands:
/menushows the active persona and available presets/persona <id>switches the current persona preset/character key=value ...updates the current character profile/resetclears the session memory and custom overrides/startshows the current opening line
Character fields support name, age, gender, style, voice, mood, boundaries, and opening.
The bundled persona presets live in data/personas.json.
Deployment Checks
Health check:
curl https://thewheke-babble.hf.space/health
Expected response:
{"status":"ok","service":"babble"}
Set the Telegram webhook:
curl "https://api.telegram.org/bot<TELEGRAM_BOT_TOKEN>/setWebhook?url=https://thewheke-babble.hf.space/telegram/webhook/<WEBHOOK_SECRET>"
Check Telegram webhook status:
curl "https://api.telegram.org/bot<TELEGRAM_BOT_TOKEN>/getWebhookInfo"
Required Hugging Face Space secrets:
TELEGRAM_BOT_TOKENWEBHOOK_SECRETLLM_PROVIDER=stubLLM_API_KEY=stub
Optional debug endpoint:
/debug/configexists only whenDEBUG=true.- It reports whether required settings are configured, but never returns secret values.
Useful environment variables:
PERSONA_IDPERSONAS_PATHMEMORY_ENABLEDMEMORY_PATHMEMORY_MAX_TURNS