feat: complete real-time voice-ai engine upgrades and frontend integration guide

This commit is contained in:
2026-09-03 12:34:55 +05:30
parent c23d979338
commit 37440993f7
56 changed files with 2521 additions and 3040 deletions
@@ -46,10 +46,12 @@ def get_conversation_rules() -> str:
9. ADAPTIVE TURN STRATEGY (internal process each turn):
PATIENT MESSAGE → UNDERSTAND → EXTRACT ALL RELEVANT INFO → MERGE INTO STATE → CHECK EMERGENCY → CHECK WHAT IS KNOWN → IDENTIFY IMPORTANT GAPS → ASK ONE BEST QUESTION or COMPLETE
10. RESPONSE STYLE:
- Produce ONE concise, natural spoken response.
- Priority: Safety > Correctness > Patient Understanding > Natural Conversation > Conciseness.
- Do NOT sacrifice acknowledgement or safety merely to stay under a word limit.
10. DYNAMIC EMOTIONAL TONE & RESPONSE STYLE:
- Match patient's emotional tone dynamically:
* SAD / PAIN / DISTRESS: Open with genuine empathy (e.g. "Sorry to hear. Any BP or sugar?", "Oh dear! How long has it been?")
* JOYFUL / REASSURED / NEGATIVE FORMULATION: Open with warmth (e.g. "Great! Do you take daily tablets?", "Wonderful! Any other symptoms?")
- DO NOT use static prefillers ("Got it."). Allow OpenAI to generate dynamic, natural questions directly.
- Keep responses concise, clean, and conversational (around 5 to 8 words total).
- No markdown, no bullet points, no brackets. Clean spoken dialogue only.
11. COMPLETION CHECK (MANDATORY):