We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 95921e5 + 8ddddc0 commit b1e1677Copy full SHA for b1e1677
1 file changed
src/google/adk/runners.py
@@ -1381,6 +1381,10 @@ def _find_user_message_for_invocation(
1381
return event.content
1382
return None
1383
1384
+ def _create_invocation_context(self, **kwargs) -> InvocationContext:
1385
+ """Creates an InvocationContext instance."""
1386
+ return InvocationContext(**kwargs)
1387
+
1388
def _new_invocation_context(
1389
self,
1390
session: Session,
@@ -1415,7 +1419,7 @@ def _new_invocation_context(
1415
1419
if not isinstance(self.agent.code_executor, BuiltInCodeExecutor):
1416
1420
self.agent.code_executor = BuiltInCodeExecutor()
1417
1421
1418
- return InvocationContext(
1422
+ return self._create_invocation_context(
1423
artifact_service=self.artifact_service,
1424
session_service=self.session_service,
1425
memory_service=self.memory_service,
0 commit comments