MCPcopy Index your code
hub / github.com/google/adk-python / forward_events

Method forward_events

src/google/adk/cli/api_server.py:1661–1690  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1659 live_request_queue = LiveRequestQueue()
1660
1661 async def forward_events():
1662 runner = await self.get_runner_async(app_name)
1663 run_config = RunConfig(
1664 response_modalities=modalities,
1665 proactivity=(
1666 types.ProactivityConfig(proactive_audio=proactive_audio)
1667 if proactive_audio is not None
1668 else None
1669 ),
1670 enable_affective_dialog=enable_affective_dialog,
1671 session_resumption=(
1672 types.SessionResumptionConfig(
1673 transparent=enable_session_resumption
1674 )
1675 if enable_session_resumption is not None
1676 else None
1677 ),
1678 save_live_blob=save_live_blob,
1679 )
1680 async with Aclosing(
1681 runner.run_live(
1682 session=session,
1683 live_request_queue=live_request_queue,
1684 run_config=run_config,
1685 )
1686 ) as agen:
1687 async for event in agen:
1688 await websocket.send_text(
1689 event.model_dump_json(exclude_none=True, by_alias=True)
1690 )
1691
1692 async def process_messages():
1693 try:

Callers

nothing calls this directly

Calls 4

get_runner_asyncMethod · 0.95
RunConfigClass · 0.85
model_dump_jsonMethod · 0.80
run_liveMethod · 0.45

Tested by

no test coverage detected