mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-07-16 04:02:55 -06:00
fix: Use new id for every event.
Fixes #297 PiperOrigin-RevId: 755901205
This commit is contained in:
parent
a4adb739c0
commit
26f55fb5ab
@ -261,7 +261,6 @@ class BaseLlmFlow(ABC):
|
|||||||
|
|
||||||
# Calls the LLM.
|
# Calls the LLM.
|
||||||
model_response_event = Event(
|
model_response_event = Event(
|
||||||
id=Event.new_id(),
|
|
||||||
invocation_id=invocation_context.invocation_id,
|
invocation_id=invocation_context.invocation_id,
|
||||||
author=invocation_context.agent.name,
|
author=invocation_context.agent.name,
|
||||||
branch=invocation_context.branch,
|
branch=invocation_context.branch,
|
||||||
@ -273,6 +272,8 @@ class BaseLlmFlow(ABC):
|
|||||||
async for event in self._postprocess_async(
|
async for event in self._postprocess_async(
|
||||||
invocation_context, llm_request, llm_response, model_response_event
|
invocation_context, llm_request, llm_response, model_response_event
|
||||||
):
|
):
|
||||||
|
# Use a new id for every event.
|
||||||
|
event.id = Event.new_id()
|
||||||
yield event
|
yield event
|
||||||
|
|
||||||
async def _preprocess_async(
|
async def _preprocess_async(
|
||||||
|
Loading…
Reference in New Issue
Block a user