Conversation
…vekit/agents into tina/healthcare-agent-example
…agents into tina/healthcare-example
| self.session.generate_reply( | ||
| instructions="Inform the user that an existing profile has been found with their details." | ||
| ) |
There was a problem hiding this comment.
🟡 Missing await on generate_reply causes "profile found" speech to be lost during task transition
In the except ProfileFound handler, self.session.generate_reply(...) is called without await. The method returns immediately, queuing the speech asynchronously. Then profile_authenticator returns to the caller (e.g., schedule_appointment at examples/healthcare/healthcare_agent.py:558-559), which immediately starts ScheduleAppointmentTask. This task transition likely interrupts/cancels the still-pending speech handle, so the user never hears that their existing profile was found. Every other important speech in this file is awaited (e.g., examples/healthcare/healthcare_agent.py:618-619, examples/healthcare/healthcare_agent.py:101-103).
| self.session.generate_reply( | |
| instructions="Inform the user that an existing profile has been found with their details." | |
| ) | |
| await self.session.generate_reply( | |
| instructions="Inform the user that an existing profile has been found with their details." | |
| ) |
Was this helpful? React with 👍 or 👎 to provide feedback.
No description provided.