Add AI chat backend via OpenRouter with knowledge-base fallback
POST /api/public/chat proxies to OpenRouter (model from OPENROUTER_MODEL, default deepseek/deepseek-v4-flash:nitro) with a system prompt built from live site config, sponsor queue, and strict guardrails (no income claims, seed-phrase warnings, Telegram fallback). Rate-limited per IP. Without OPENROUTER_API_KEY set, or on any API error, the widget transparently falls back to the built-in knowledge base, so the chat always works. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -44,3 +44,5 @@ a{color:inherit}.wrap{width:min(1160px,calc(100% - 32px));margin:auto}.nav{heigh
|
||||
.chat-foot{padding:8px 14px 12px;font-size:12px;color:var(--muted);text-align:center}
|
||||
.chat-foot a{color:var(--teal)}
|
||||
.chat-hidden{display:none}
|
||||
.chat-typing{letter-spacing:3px;animation:chatpulse 1s infinite}
|
||||
@keyframes chatpulse{50%{opacity:.35}}
|
||||
|
||||
Reference in New Issue
Block a user