Salva le credenziali?
Le credenziali vengono cifrate localmente con AES-256-GCM e non escono dal tuo dispositivo.
Prysm.AI
Assistente Intelligente
oppure
Password dimenticata?
oppure
Torna al login
Conversazioni
Prysm.AI — 2026
Download
Prysm.AI
Come posso aiutarti?
Gratuiti
Llama 3.3 70B
Free
Gemma 3 27B
Free
Premium
Claude Sonnet 4.6
Premium

 · L'AI può sbagliare, verifica le informazioni importanti

© 2026 Prysm.AI — Tutti i diritti riservati  ·  Privacy Policy
Codice HTML
// ==================== SUPPORT CHAT ==================== let supportChatId = null; let supportMessages = []; let supportHumanMode = false; let supportCheckInterval = null; function openSupport() { closeM('pm'); closeM('cm'); closeM('slm'); closeM('sm'); document.getElementById('support-modal').classList.add('op'); if (!supportChatId) { supportChatId = 'support_' + gid(); supportMessages = []; addSupportMessage('assistant', 'Ciao! Sono l'assistente di supporto di Prysm.AI. Come posso aiutarti oggi?'); } document.getElementById('support-input').focus(); } function closeSupport() { document.getElementById('support-modal').classList.remove('op'); } function addSupportMessage(role, content) { const container = document.getElementById('support-msgs'); const row = document.createElement('div'); row.className = 'mrow ' + role; row.style.animation = 'msgIn .35s var(--spring) both'; const ini = role === 'user' ? (sess?.username || 'U').charAt(0).toUpperCase() : 'AI'; const avcl = role === 'user' ? 'avusr' : 'avai'; const fmt = fmtC(content); if (role === 'user') { row.innerHTML = `
${fmt}
${ini}
`; } else { row.innerHTML = `
${ini}
${fmt}
`; } container.appendChild(row); container.scrollTop = container.scrollHeight; } function addSupportTyping() { const container = document.getElementById('support-msgs'); const r = document.createElement('div'); r.className = 'mrow assistant'; r.id = 'support-typing'; r.innerHTML = '
AI
'; container.appendChild(r); container.scrollTop = container.scrollHeight; return r; } async function sendSupportMessage() { const inp = document.getElementById('support-input'); const tx = inp.value.trim(); if (!tx) return; addSupportMessage('user', tx); inp.value = ''; inp.style.height = 'auto'; if (supportHumanMode) { // In human mode, just wait for staff response addSupportTyping(); try { await fetch('/api/support/message', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-session': sess?.token || 'guest' }, body: JSON.stringify({ chatId: supportChatId, content: tx, role: 'user', humanMode: true }) }); } catch(e) {} return; } const te = addSupportTyping(); try { const body = { model: 'llama-3.3-70b-versatile', messages: [ { role: 'system', content: 'Sei un assistente di supporto per Prysm.AI, una piattaforma di chat AI. Aiuta gli utenti con problemi tecnici, domande sul servizio, e guida. Se l'utente ha bisogno di aiuto umano, suggerisci di cliccare "Parla con un umano". Rispondi in italiano.' }, ...supportMessages.map(m => ({ role: m.role, content: m.content })), { role: 'user', content: tx } ] }; const r = await fetch('/api/chat', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-session': sess?.token || 'guest' }, body: JSON.stringify(body) }); const data = await r.json(); te.remove(); if (data.error) throw new Error(data.error); const rep = data.choices?.[0]?.message?.content || 'Nessuna risposta.'; addSupportMessage('assistant', rep); supportMessages.push({ role: 'user', content: tx }); supportMessages.push({ role: 'assistant', content: rep }); // Save support chat to server try { await fetch('/api/support/save', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-session': sess?.token || 'guest' }, body: JSON.stringify({ chatId: supportChatId, messages: supportMessages, username: sess?.username || 'guest', humanMode: supportHumanMode }) }); } catch(e) {} } catch(err) { te.remove(); addSupportMessage('assistant', 'Errore: ' + (err.message || 'Qualcosa è andato storto.')); } } async function requestHuman() { supportHumanMode = true; document.getElementById('human-requested').style.display = 'block'; document.getElementById('btn-human').style.display = 'none'; document.getElementById('btn-resolve').style.display = 'inline-flex'; document.getElementById('support-status').textContent = 'In attesa di operatore umano...'; addSupportMessage('assistant', 'Ho inviato la tua richiesta al nostro team di supporto. Un operatore umano ti risponderà il prima possibile. Nel frattempo, puoi continuare a scrivere qui.'); try { await fetch('/api/support/escalate', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-session': sess?.token || 'guest' }, body: JSON.stringify({ chatId: supportChatId, username: sess?.username || 'guest', email: sess?.email || '' }) }); } catch(e) {} // Start polling for human responses startSupportPolling(); } function startSupportPolling() { if (supportCheckInterval) clearInterval(supportCheckInterval); supportCheckInterval = setInterval(async () => { try { const r = await fetch(`/api/support/messages?chatId=${supportChatId}`, { headers: { 'x-session': sess?.token || 'guest' } }); const d = await r.json(); if (d.ok && d.messages) { // Check for new human messages const humanMsgs = d.messages.filter(m => m.role === 'human'); humanMsgs.forEach(m => { if (!supportMessages.find(sm => sm.id === m.id)) { addSupportMessage('assistant', `👤 **Staff:** ${m.content}`); supportMessages.push({ role: 'human', content: m.content, id: m.id }); } }); } } catch(e) {} }, 3000); } function resolveSupport() { supportHumanMode = false; if (supportCheckInterval) clearInterval(supportCheckInterval); document.getElementById('human-requested').style.display = 'none'; document.getElementById('btn-human').style.display = 'inline-flex'; document.getElementById('btn-resolve').style.display = 'none'; document.getElementById('support-status').textContent = 'Assistenza AI attiva'; addSupportMessage('assistant', 'Chat contrassegnata come risolta. Se hai bisogno di altro aiuto, sono qui!'); try { fetch('/api/support/resolve', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-session': sess?.token || 'guest' }, body: JSON.stringify({ chatId: supportChatId }) }); } catch(e) {} } // Close support modal when clicking overlay document.getElementById('support-modal').addEventListener('click', function(e) { if (e.target === this) closeSupport(); });
Leivarr Community
Caricamento...
Membri Online
Caricamento...
Unisciti al server →
Supporto Prysm
Assistenza AI attiva
Richiesta inviata allo staff. Un operatore ti risponderà presto.