# ─── Core ─────────────────────────────────────────────────────────────── # SIMPLE deploy (recommended): SQLite on a persistent volume — no database to provision. DATABASE_URL=sqlite+aiosqlite:////app/data/bot.db # At scale, switch to Postgres + pgvector instead: # DATABASE_URL=postgresql+psycopg://user:pass@host:5432/chatbot TESTING=0 # ─── LLM: Groq (primary, free tier) ───────────────────────────────────── # Create a key at https://console.groq.com (free, no card). Commercial OK, no training on data. GROQ_API_KEY= # Redundancy: add MORE keys (comma-separated) so the bot never fails — the router # tries each in order and fails over on rate-limit/error. e.g. k1,k2,k3 GROQ_API_KEYS= GROQ_BASE_URL=https://api.groq.com/openai/v1 # gpt-oss-120b is reliable for tool calling on Groq (Llama 3.3 70B isn't). MODEL_LARGE=openai/gpt-oss-120b MODEL_SMALL=llama-3.1-8b-instant # ─── LLM: Cloudflare Workers AI (automatic failover, free tier) ───────── # Account ID + API token (Workers AI) from the Cloudflare dashboard. Free 10k neurons/day, no training. CLOUDFLARE_ACCOUNT_ID= CLOUDFLARE_API_TOKEN= CF_MODEL_LARGE=@cf/meta/llama-3.3-70b-instruct-fp8-fast CF_MODEL_SMALL=@cf/meta/llama-3.1-8b-instruct # ─── LLM: Cerebras (3rd provider, free, very fast, no training) ───────── # Free API key at https://cloud.cerebras.ai (no card). Independent capacity. CEREBRAS_API_KEY= CEREBRAS_MODEL=gpt-oss-120b # Provider order (comma-separated). Default: groq first, cloudflare failover. LLM_PROVIDER_ORDER=groq,cloudflare # ─── Shopify ───────────────────────────────────────────────────────────── # MULTI-TENANT: each store's Shopify creds are set PER TENANT in the admin panel # (stored encrypted), NOT here. These global vars are only used by the optional # single-tenant App Proxy path. Leave blank for the standard multi-tenant setup. SHOPIFY_SHOP= SHOPIFY_CLIENT_ID= SHOPIFY_CLIENT_SECRET= SHOPIFY_API_VERSION=2026-01 # App Proxy shared secret (the app's client secret is used to sign proxy requests). SHOPIFY_APP_PROXY_SECRET= # Orders older than 60 days need the protected read_all_orders scope (Shopify approval). Off by default. SHOPIFY_READ_ALL_ORDERS=0 # ─── Admin panel ──────────────────────────────────────────────────────── # Bearer token to access the admin API/UI (ours, super-admin). Long random string. ADMIN_TOKEN= # Key used to encrypt each tenant's Shopify secret at rest. CHANGE in production. SECRET_KEY=change-me-to-a-long-random-string # ─── Branding (runtime-overridable from the admin panel) ──────────────── BRAND_NAME=Asistente # ─── CORS for the public widget (simple mode). "*" or a comma list. ───── ALLOWED_ORIGINS=* # ─── Embeddings (local, free; 384-dim multilingual via fastembed/ONNX) ── EMBEDDING_MODEL=sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 # ─── Verification / retention ─────────────────────────────────────────── ORDER_VERIFY_MAX_ATTEMPTS=5 ORDER_VERIFY_LOCKOUT_SECONDS=900 SESSION_RETENTION_DAYS=30 # ─── Human escalation (SMTP) ──────────────────────────────────────────── SUPPORT_EMAIL=support@your-store.com SMTP_HOST= SMTP_PORT=587 SMTP_USER= SMTP_PASSWORD= SMTP_FROM=bot@your-store.com