mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
fix: Make sure each partial event has different timestamp
PiperOrigin-RevId: 778148175
This commit is contained in:
committed by
Copybara-Service
parent
43083baddc
commit
17d6042995
@@ -16,6 +16,7 @@ from __future__ import annotations
|
||||
|
||||
from abc import ABC
|
||||
import asyncio
|
||||
import datetime
|
||||
import inspect
|
||||
import logging
|
||||
from typing import AsyncGenerator
|
||||
@@ -320,6 +321,7 @@ class BaseLlmFlow(ABC):
|
||||
):
|
||||
# Update the mutable event id to avoid conflict
|
||||
model_response_event.id = Event.new_id()
|
||||
model_response_event.timestamp = datetime.datetime.now().timestamp()
|
||||
yield event
|
||||
|
||||
async def _preprocess_async(
|
||||
|
||||
Reference in New Issue
Block a user