Core logic to run this agent via text-based conversation. Args: ctx: InvocationContext, the invocation context for this agent. Yields: Event: the events generated by the agent.
(
self, ctx: InvocationContext
)
| 360 | yield event |
| 361 | |
| 362 | async def _run_async_impl( |
| 363 | self, ctx: InvocationContext |
| 364 | ) -> AsyncGenerator[Event, None]: |
| 365 | """Core logic to run this agent via text-based conversation. |
| 366 | |
| 367 | Args: |
| 368 | ctx: InvocationContext, the invocation context for this agent. |
| 369 | |
| 370 | Yields: |
| 371 | Event: the events generated by the agent. |
| 372 | """ |
| 373 | raise NotImplementedError( |
| 374 | f'_run_async_impl for {type(self)} is not implemented.' |
| 375 | ) |
| 376 | yield # AsyncGenerator requires having at least one yield statement |
| 377 | |
| 378 | async def _run_live_impl( |
| 379 | self, ctx: InvocationContext |