diff --git a/src/agents/realtime/openai_realtime.py b/src/agents/realtime/openai_realtime.py index 50aaf3c4b..ce28114c9 100644 --- a/src/agents/realtime/openai_realtime.py +++ b/src/agents/realtime/openai_realtime.py @@ -431,7 +431,7 @@ async def _send_interrupt(self, event: RealtimeModelSendInterrupt) -> None: and session.audio is not None and session.audio.input is not None and session.audio.input.turn_detection is not None - and session.audio.input.turn_detection.interrupt_response is True, + and session.audio.input.turn_detection.interrupt_response is True ) if not automatic_response_cancellation_enabled: await self._cancel_response() @@ -616,7 +616,7 @@ async def _handle_ws_event(self, event: dict[str, Any]): and session.audio is not None and session.audio.input is not None and session.audio.input.turn_detection is not None - and session.audio.input.turn_detection.interrupt_response is True, + and session.audio.input.turn_detection.interrupt_response is True ) if not automatic_response_cancellation_enabled: await self._cancel_response()