hi, just encounter the function_call item event is...
# agents
f
hi, just encounter the function_call item event is emitted multiple times
Copy code
@session.on(Events.function_tools_executed)
    def on_function_tools_executed(event: FunctionToolsExecutedEvent):
      # tool call/tool output must pair
      items = []
      for tool_call, tool_call_output in event.zipped():
        if tool_call_output.output:
          items.append(tool_call.model_dump(exclude_none=True))
          items.append(tool_call_output.model_dump(exclude_none=True))
      if not items:
        return
      main_logger.debug('storing tool call and output: %s', items)
      asyncio.create_task(agent_manager.session.add_items(items))
from the log we observed that very often the same event are emmited multiple times (likely 3, but sometimes 2), we have an llm fallback adapter of 3 llm as well