mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
feat: Persist user input content to session in live mode
Co-authored-by: Xiang (Sean) Zhou <seanzhougoogle@google.com> PiperOrigin-RevId: 859207592
This commit is contained in:
committed by
Copybara-Service
parent
5d941460b6
commit
a04828dd8a
@@ -409,6 +409,10 @@ class MockLlmConnection(BaseLlmConnection):
|
||||
async def receive(self) -> AsyncGenerator[LlmResponse, None]:
|
||||
"""Yield each of the pre-defined LlmResponses."""
|
||||
for response in self.llm_responses:
|
||||
# Yield control to allow other tasks (like send_task) to run first.
|
||||
# This ensures user content gets persisted before the mock response
|
||||
# is yielded.
|
||||
await asyncio.sleep(0)
|
||||
yield response
|
||||
|
||||
async def close(self):
|
||||
|
||||
Reference in New Issue
Block a user