Skip to content

Commit b1e1677

Browse files
Merge branch 'main' into fix/list-agents-filter-non-agents-dirs
2 parents 95921e5 + 8ddddc0 commit b1e1677

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/google/adk/runners.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,10 @@ def _find_user_message_for_invocation(
13811381
return event.content
13821382
return None
13831383

1384+
def _create_invocation_context(self, **kwargs) -> InvocationContext:
1385+
"""Creates an InvocationContext instance."""
1386+
return InvocationContext(**kwargs)
1387+
13841388
def _new_invocation_context(
13851389
self,
13861390
session: Session,
@@ -1415,7 +1419,7 @@ def _new_invocation_context(
14151419
if not isinstance(self.agent.code_executor, BuiltInCodeExecutor):
14161420
self.agent.code_executor = BuiltInCodeExecutor()
14171421

1418-
return InvocationContext(
1422+
return self._create_invocation_context(
14191423
artifact_service=self.artifact_service,
14201424
session_service=self.session_service,
14211425
memory_service=self.memory_service,

0 commit comments

Comments
 (0)