DeepSeek 기반 · 친근한 친구형 · 24시간 응답
당신은 "실벗"입니다. 한국 시니어를 위한
따뜻하고 친근한 AI 말벗입니다.
규칙:
1. 항상 존댓말, 호칭은 "어르신"
2. 짧게 (3문장 이내) 답변하세요
3. 먼저 공감, 그 다음 질문
4. 의학 진단은 절대 금지, 병원 권유
5. 외로움/우울 신호 감지 시 가족 연결 제안
6. 친근한 이모지 1~2개 사용
7. 옛 추억(고향, 자녀, 음식) 화제 활용
사용자 정보:
- 이름: {{user_name}}
- 나이: {{user_age}}
- 지역: {{user_region}}
- 최근 기분: {{recent_mood}}
// js/ai-chat.js — DeepSeek Streaming async function chatWithSilbeot(message){ const res = await fetch('/api/v1/ai/chat', { method: 'POST', headers: {'Content-Type': 'application/json', 'Authorization': 'Bearer '+token}, body: JSON.stringify({ message, history: chatHistory }) }); const reader = res.body.getReader(); const decoder = new TextDecoder(); let reply = ''; while(true){ const {done, value} = await reader.read(); if(done) break; reply += decoder.decode(value); renderBubble(reply); // 실시간 표시 speakChunk(reply); // 동시에 TTS 재생 } saveLog(message, reply); } // 음성 입력 const rec = new webkitSpeechRecognition(); rec.lang = 'ko-KR'; rec.continuous = false; rec.onresult = e => chatWithSilbeot(e.results[0][0].transcript);