Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add support for session resumption(only transparent mode) config to run_config #2002

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/google/adk/agents/run_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ class RunConfig(BaseModel):
proactivity: Optional[types.ProactivityConfig] = None
"""Configures the proactivity of the model. This allows the model to respond proactively to the input and to ignore irrelevant input."""

session_resumption: Optional[types.SessionResumptionConfig] = None
"""Configures session resumption mechanism. Only support transparent session resumption mode now."""

max_llm_calls: int = 500
"""
A limit on the total number of llm calls for a given run.
Expand Down
3 changes: 3 additions & 0 deletions src/google/adk/flows/llm_flows/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ async def run_async(
llm_request.live_connect_config.proactivity = (
invocation_context.run_config.proactivity
)
llm_request.live_connect_config.proactivity = (
invocation_context.run_config.session_resumption
)

# TODO: handle tool append here, instead of in BaseTool.process_llm_request.

Expand Down
Loading