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

Class _TestingAgent

tests/unittests/agents/test_loop_agent.py:37–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36
37class _TestingAgent(BaseAgent):
38
39 @override
40 async def _run_async_impl(
41 self, ctx: InvocationContext
42 ) -> AsyncGenerator[Event, None]:
43 yield Event(
44 author=self.name,
45 invocation_id=ctx.invocation_id,
46 content=types.Content(
47 parts=[types.Part(text=f'Hello, async {self.name}!')]
48 ),
49 )
50
51 @override
52 async def _run_live_impl(
53 self, ctx: InvocationContext
54 ) -> AsyncGenerator[Event, None]:
55 yield Event(
56 author=self.name,
57 invocation_id=ctx.invocation_id,
58 content=types.Content(
59 parts=[types.Part(text=f'Hello, live {self.name}!')]
60 ),
61 )
62
63
64class _TestingAgentWithEscalateAction(BaseAgent):

Calls

no outgoing calls