mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
feat: Implement Live Session Resumption
Previous implementation doesn't pass the actual handle to server. Now we cache the handle and pass it over when reconnection happens.
To enable:
run_config = RunConfig(
session_resumption=types.SessionResumptionConfig(transparent=True)
)
PiperOrigin-RevId: 791308462
This commit is contained in:
committed by
Copybara-Service
parent
423542a43f
commit
71fbc9275b
@@ -89,6 +89,11 @@ class LlmResponse(BaseModel):
|
||||
usage_metadata: Optional[types.GenerateContentResponseUsageMetadata] = None
|
||||
"""The usage metadata of the LlmResponse"""
|
||||
|
||||
live_session_resumption_update: Optional[
|
||||
types.LiveServerSessionResumptionUpdate
|
||||
] = None
|
||||
"""The session resumption update of the LlmResponse"""
|
||||
|
||||
@staticmethod
|
||||
def create(
|
||||
generate_content_response: types.GenerateContentResponse,
|
||||
|
||||
Reference in New Issue
Block a user