(
agent: LlmAgent, state: Optional[dict[str, object]] = None
)
| 111 | |
| 112 | |
| 113 | async 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 |
no test coverage detected