Skip to content

Commit 9193be4

Browse files
Update src/google/adk/cli/fast_api.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent c981bda commit 9193be4

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

src/google/adk/cli/fast_api.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -503,20 +503,11 @@ async def _get_a2a_runner_async() -> Runner:
503503
):
504504
# VertexAiSessionService is not compliant with A2A (impossible to create session on the fly with contextID)
505505
# So, change it to InMemorySessionService. Put the other service in memory because persistence do not make sense
506-
kwargs = {}
507-
if original_runner.app:
508-
kwargs["app"] = original_runner.app
509-
else:
510-
kwargs["app_name"] = original_runner.app_name
511-
kwargs["agent"] = original_runner.agent
512-
513-
runner = Runner(
514-
session_service=InMemorySessionService(),
515-
artifact_service=InMemoryArtifactService(),
516-
memory_service=InMemoryMemoryService(),
517-
credential_service=InMemoryCredentialService(),
518-
**kwargs,
519-
)
506+
runner = copy.copy(original_runner)
507+
runner.session_service = InMemorySessionService()
508+
runner.artifact_service = InMemoryArtifactService()
509+
runner.memory_service = InMemoryMemoryService()
510+
runner.credential_service = InMemoryCredentialService()
520511
return runner
521512
return original_runner
522513

0 commit comments

Comments
 (0)