diff --git a/src/pipecat/transports/services/daily.py b/src/pipecat/transports/services/daily.py index b280ee4d8..16a1f29ac 100644 --- a/src/pipecat/transports/services/daily.py +++ b/src/pipecat/transports/services/daily.py @@ -102,7 +102,7 @@ class DailyCallbacks(BaseModel): on_joined: Callable[[Mapping[str, Any]], None] on_left: Callable[[], None] on_participant_joined: Callable[[Mapping[str, Any]], None] - on_participant_left: Callable[[Mapping[str, Any]], None] + on_participant_left: Callable[[Mapping[str, Any], str], None] on_first_participant_joined: Callable[[Mapping[str, Any]], None] on_error: Callable[[str], None] @@ -376,11 +376,11 @@ def on_participant_joined(self, participant): self._callbacks.on_participant_joined(participant) - def on_participant_leave(self, participant): + def on_participant_left(self, participant, reason): id = participant["id"] logger.info(f"Participant left {id}") - self._callbacks.on_participant_left(participant) + self._callbacks.on_participant_left(participant, reason) def on_transcription_message(self, message: Mapping[str, Any]): participant_id = "" @@ -655,8 +655,8 @@ def _on_error(self, error): def _on_participant_joined(self, participant): self.on_participant_joined(participant) - def _on_participant_left(self, participant): - self.on_participant_left(participant) + def _on_participant_left(self, participant, reason): + self.on_participant_left(participant, reason) def _on_first_participant_joined(self, participant): self.on_first_participant_joined(participant) @@ -688,7 +688,7 @@ def on_left(self): def on_participant_joined(self, participant): pass - def on_participant_left(self, participant): + def on_participant_left(self, participant, reason): pass def on_first_participant_joined(self, participant):