We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de1a4ee commit 0de3d9fCopy full SHA for 0de3d9f
1 file changed
livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/realtime/realtime_model.py
@@ -1615,14 +1615,15 @@ def truncate(
1615
audio_transcript: NotGivenOr[str] = NOT_GIVEN,
1616
) -> None:
1617
if "audio" in modalities:
1618
- self.send_event(
1619
- ConversationItemTruncateEvent(
1620
- type="conversation.item.truncate",
1621
- content_index=0,
1622
- item_id=message_id,
1623
- audio_end_ms=audio_end_ms,
+ if audio_end_ms > 0:
+ self.send_event(
+ ConversationItemTruncateEvent(
+ type="conversation.item.truncate",
+ content_index=0,
+ item_id=message_id,
1624
+ audio_end_ms=audio_end_ms,
1625
+ )
1626
)
- )
1627
elif utils.is_given(audio_transcript):
1628
# sync the forwarded text to the remote chat ctx
1629
chat_ctx = self.chat_ctx.copy(
0 commit comments