Skip to content

Commit e1214c1

Browse files
google-genai-botcopybara-github
authored andcommitted
fix: Fix the incorrect timestamp in Event
PiperOrigin-RevId: 791274090
1 parent a678cca commit e1214c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/src/main/java/com/google/adk/flows/llmflows/BaseLlmFlow.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ private Flowable<Event> runOneStep(InvocationContext context) {
348348
.author(context.agent().name())
349349
.branch(context.branch())
350350
.build();
351+
// Explicitly set the event timestamp to 0 so the postprocessing logic would generate
352+
// events with fresh timestamp.
353+
mutableEventTemplate.setTimestamp(0L);
351354

352355
Flowable<Event> restOfFlow =
353356
callLlm(context, llmRequestAfterPreprocess, mutableEventTemplate)

0 commit comments

Comments
 (0)