Skip to content

Commit 74f2a14

Browse files
committed
fix: resolve mypy narrowing error and pass invocation_id in web server
Signed-off-by: Akshat Kumar <akshat230405@gmail.com>
1 parent 1e06548 commit 74f2a14

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/google/adk/cli/adk_web_server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,7 @@ async def run_agent(req: RunAgentRequest) -> list[Event]:
14981498
session_id=req.session_id,
14991499
new_message=req.new_message,
15001500
state_delta=req.state_delta,
1501+
invocation_id=req.invocation_id,
15011502
)
15021503
) as agen:
15031504
events = [event async for event in agen]

src/google/adk/runners.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ async def _run_with_trace(
496496
) -> AsyncGenerator[Event, None]:
497497
with tracer.start_as_current_span('invocation'):
498498
session = await self._get_or_create_session(
499-
user_id=cast(str, user_id), session_id=cast(str, session_id)
499+
user_id=user_id, session_id=session_id
500500
)
501501

502502
if not invocation_id and not new_message:

0 commit comments

Comments
 (0)