From 403b6d7ea3533cd589d2830407d5df8a2f6ec448 Mon Sep 17 00:00:00 2001 From: Berack96 Date: Mon, 20 Oct 2025 14:15:07 +0200 Subject: [PATCH] Correggi l'assegnazione dei valori per RUN_FINISHED e TOOL_USED in PipelineEvent --- src/app/agents/pipeline.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/agents/pipeline.py b/src/app/agents/pipeline.py index 953108c..4efdd2c 100644 --- a/src/app/agents/pipeline.py +++ b/src/app/agents/pipeline.py @@ -20,8 +20,8 @@ class PipelineEvent(str, Enum): INFO_RECOVERY = "Info Recovery" REPORT_GENERATION = "Report Generation" REPORT_TRANSLATION = "Report Translation" - RUN_FINISHED = WorkflowRunEvent.workflow_completed - TOOL_USED = RunEvent.tool_call_completed + RUN_FINISHED = WorkflowRunEvent.workflow_completed.value + TOOL_USED = RunEvent.tool_call_completed.value def check_event(self, event: str, step_name: str) -> bool: return event == self.value or (WorkflowRunEvent.step_completed == event and step_name == self.value) @@ -33,7 +33,7 @@ class PipelineEvent(str, Enum): (PipelineEvent.QUERY_ANALYZER, lambda _: logging.info(f"[{run_id}] Query Analyzer completed.")), (PipelineEvent.INFO_RECOVERY, lambda _: logging.info(f"[{run_id}] Info Recovery completed.")), (PipelineEvent.REPORT_GENERATION, lambda _: logging.info(f"[{run_id}] Report Generation completed.")), - (PipelineEvent.TOOL_USED, lambda e: logging.info(f"[{run_id}] Tool used: {getattr(e, 'tool_name', 'unknown')}")), + (PipelineEvent.TOOL_USED, lambda e: logging.info(f"[{run_id}] Tool used [{e.tool.tool_name}] by {e.agent_name}.")), (PipelineEvent.RUN_FINISHED, lambda _: logging.info(f"[{run_id}] Run completed.")), ]