8000 fix: Use new id for every event. · bhancockio/adk-python@26f55fb · GitHub
[go: up one dir, main page]

Skip to content

Commit 26f55fb

Browse files
DeanChensjcopybara-github
authored andcommitted
fix: Use new id for every event.
Fixes google#297 PiperOrigin-RevId: 755901205
1 parent a4adb73 commit 26f55fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/google/adk/flows/llm_flows/base_llm_flow.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ async def _run_one_step_async(
261261

262262
# Calls the LLM.
263263
model_response_event = Event(
264-
id=Event.new_id(),
265264
invocation_id=invocation_context.invocation_id,
266265
author=invocation_context.agent.name,
267266
branch=invocation_context.branch,
@@ -273,6 +272,8 @@ async def _run_one_step_async(
273272
async for event in self._postprocess_async(
274273
invocation_context, llm_request, llm_response, model_response_event
275274
):
275+
# Use a new id for every event.
276+
event.id = Event.new_id()
276277
yield event
277278

278279
async def _preprocess_async(

0 commit comments

Comments
 (0)
0