-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: expose live_session_resumption_update in events for cross-connection resumption #4358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
2f77fbb
3cb4a66
ecfc3a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -739,6 +739,15 @@ async def _postprocess_live( | |
| async for event in agen: | ||
| yield event | ||
|
|
||
| # Handle session resumption updates for cross-connection resumption. | ||
| # Must be before skip condition - resumption updates have no content. | ||
| if llm_response.live_session_resumption_update: | ||
| model_response_event.live_session_resumption_update = ( | ||
| llm_response.live_session_resumption_update | ||
| ) | ||
| yield model_response_event | ||
| return | ||
|
Comment on lines
+736
to
+751
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This new logic is a great addition for enabling cross-connection session resumption. To ensure this feature remains robust and to prevent future regressions, it would be beneficial to add a unit test for this new code path in
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you please add a unit test. |
||
|
|
||
| # Skip the model response event if there is no content and no error code. | ||
| # This is needed for the code executor to trigger another loop. | ||
| # But don't skip control events like turn_complete or transcription events. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.