You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/Context_summarization_with_realtime_api.ipynb
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -333,6 +333,14 @@
333
333
" return resp.choices[0].message.content.strip()"
334
334
]
335
335
},
336
+
{
337
+
"cell_type": "markdown",
338
+
"metadata": {},
339
+
"source": [
340
+
"Important implementation detail:\n",
341
+
"- The summary is appended as a SYSTEM message rather than an ASSISTANT message. Testing revealed that, during extended conversations, using ASSISTANT messages for summaries can cause the model to mistakenly switch from audio responses to text responses. By using SYSTEM messages for summaries (which can also include additional custom instructions), we clearly signal to the model that these are context-setting instructions, preventing it from incorrectly adopting the modality of the ongoing user-assistant interaction."
0 commit comments