from rubric import Rubricclient = Rubric() # Uses RUBRIC_API_KEY env var# Log a patient triage callclient.calls.log( project="my-first-project", transcript=[ { "speaker": "agent", "text": "Thank you for calling. How can I help you today?", "start": 0.0, "end": 3.2 }, { "speaker": "patient", "text": "I've been having chest pain since this morning. It's pretty bad.", "start": 3.8, "end": 8.1 }, { "speaker": "agent", "text": "I'm sorry to hear that. Can you describe the pain? Where exactly is it located?", "start": 8.5, "end": 13.0 }, { "speaker": "patient", "text": "It's right in the center of my chest, like pressure. And my left arm feels weird.", "start": 13.5, "end": 19.2 } ], ai_decision={ "triage_level": "emergency", "extracted_symptoms": ["chest_pain", "arm_pain"], "red_flags": ["cardiac_symptoms"], "recommended_action": "call_911" })print("✅ Call logged successfully!")