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

Method run_async

tests/unittests/workflow/testing_utils.py:328–346  ·  view source on GitHub ↗
(
      self,
      new_message: Optional[types.ContentUnion] = None,
      invocation_id: Optional[str] = None,
  )

Source from the content-addressed store, hash-verified

326 return False
327
328 async def run_async(
329 self,
330 new_message: Optional[types.ContentUnion] = None,
331 invocation_id: Optional[str] = None,
332 ) -> list[Event]:
333 # For non-resumable apps, don't reuse invocation_id on resume.
334 # State reconstruction relies on scanning events from *previous*
335 # invocations, so the resume call must get a fresh invocation_id.
336 if invocation_id and not self.is_resumable:
337 invocation_id = None
338 events = []
339 async for event in self.runner.run_async(
340 user_id=self.session.user_id,
341 session_id=self.session.id,
342 invocation_id=invocation_id,
343 new_message=get_user_content(new_message) if new_message else None,
344 ):
345 events.append(event)
346 return events
347
348 def run_live(
349 self, live_request_queue: LiveRequestQueue, run_config: RunConfig = None

Calls 2

get_user_contentFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected