MCPcopy Create free account
hub / github.com/google/adk-python / _create_invocation_context

Function _create_invocation_context

tests/unittests/telemetry/test_spans.py:113–127  ·  view source on GitHub ↗
(
    agent: LlmAgent, state: Optional[dict[str, object]] = None
)

Source from the content-addressed store, hash-verified

111
112
113async def _create_invocation_context(
114 agent: LlmAgent, state: Optional[dict[str, object]] = None
115) -> InvocationContext:
116 session_service = InMemorySessionService()
117 session = await session_service.create_session(
118 app_name='test_app', user_id='test_user', state=state
119 )
120 invocation_context = InvocationContext(
121 invocation_id='test_id',
122 agent=agent,
123 session=session,
124 session_service=session_service,
125 run_config=RunConfig(),
126 )
127 return invocation_context
128
129
130@pytest.mark.asyncio

Calls 4

create_sessionMethod · 0.95
InvocationContextClass · 0.90
RunConfigClass · 0.90

Tested by

no test coverage detected