Skip to content

Commit 8f4c2cd

Browse files
authored
docs: openai#1999 adjust the realtime module code comment (openai#2000)
1 parent a30c32e commit 8f4c2cd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/agents/realtime/openai_realtime.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,9 @@ async def _handle_ws_event(self, event: dict[str, Any]):
629629
)
630630
if not automatic_response_cancellation_enabled:
631631
await self._cancel_response()
632-
# Avoid sending conversation.item.truncate here; when GA is set to
633-
# interrupt on VAD start, the server will handle truncation.
632+
# Avoid sending conversation.item.truncate here. When the session's
633+
# turn_detection.interrupt_response is enabled (GA default), the server emits
634+
# conversation.item.truncated after the VAD start and takes care of history updates.
634635
elif parsed.type == "response.created":
635636
self._ongoing_response = True
636637
await self._emit_event(RealtimeModelTurnStartedEvent())

0 commit comments

Comments
 (0)